[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

send email using gmail as smtp

Junkone

12/20/2007 2:08:00 AM

hello
can i send email thro ruby using gmail as smtp. appreciate any help
here.
seede
4 Answers

Joshua Schairbaum

12/20/2007 2:19:00 AM

0

You can.

Here's an article on using gmail with Rails, although you don't need
to use Rails to use Action Mailer.

http://www.rubyinside.com/how-to-use-gmails-smtp-se...
rails-394.html

It's dead simple.

Josh

On Dec 19, 2007, at 9:10 PM, Junkone wrote:

> hello
> can i send email thro ruby using gmail as smtp. appreciate any help
> here.
> seede
>


Greg P

12/20/2007 2:44:00 AM

0

What do you change this to? :domain => "localhost.localdomain",
-- Gerry Ford3 Republican Square251 Michigan Av.GR, MI 49503"Joshua
Schairbaum" <joshua.schairbaum@gmail.com> wrote in message
news:BEEC9B02-690A-434B-A2EA-6FBE9F6A16BD@gmail.com...
> You can.
>
> Here's an article on using gmail with Rails, although you don't need
> to use Rails to use Action Mailer.
>
> http://www.rubyinside.com/how-to-use-gmails-smtp-se...
> rails-394.html
>
> It's dead simple.
>
> Josh
>
> On Dec 19, 2007, at 9:10 PM, Junkone wrote:
>
>> hello
>> can i send email thro ruby using gmail as smtp. appreciate any help
>> here.
>> seede
>>
>
>




----== Posted via Newsgroups.com - Usenet Access to over 100,000 Newsgroups ==----
Get Anonymous, Uncensored, Access to West and East Coast Server Farms at!
----== Highest Retention and Completion Rates! HTTP://WWW.NEWSGROUPS.COM ==----

Junkone

12/20/2007 10:18:00 PM

0

On Dec 19, 9:19 pm, Joshua Schairbaum <joshua.schairb...@gmail.com>
wrote:
> You can.
>
> Here's an article on using gmail with Rails, although you don't need
> to use Rails to use Action Mailer.
>
> http://www.rubyinside.com/how-to-use-gmails-smtp-se...
> rails-394.html
>
> It's dead simple.
>
> Josh
>
> On Dec 19, 2007, at 9:10 PM, Junkone wrote:
>
>
>
> > hello
> > can i send email thro ruby using gmail as smtp. appreciate any help
> > here.
> > seede- Hide quoted text -
>
> - Show quoted text -

I followed all the steps. however i still dont knwo how to use it. all
the exampele i can find use the rails model methods. can you post a
example of how to send the email without using rails.
appreciate your help.

seede

Junkone

12/20/2007 10:28:00 PM

0

On Dec 20, 5:17 pm, Junkone <junko...@gmail.com> wrote:
> On Dec 19, 9:19 pm, Joshua Schairbaum <joshua.schairb...@gmail.com>
> wrote:
>
>
>
>
>
> > You can.
>
> > Here's an article on using gmail with Rails, although you don't need
> > to use Rails to use Action Mailer.
>
> >http://www.rubyinside.com/how-to-use-gmails-smtp-se...
> > rails-394.html
>
> > It's dead simple.
>
> > Josh
>
> > On Dec 19, 2007, at 9:10 PM, Junkone wrote:
>
> > > hello
> > > can i send email thro ruby using gmail as smtp. appreciate any help
> > > here.
> > > seede- Hide quoted text -
>
> > - Show quoted text -
>
> I followed all the steps. however i still dont knwo how to use it. all
> the exampele i can find use the rails model methods. can you post a
> example of how to send the email without using rails.
> appreciate your help.
>
> seede- Hide quoted text -
>
> - Show quoted text -

here is what i tried,
require "smtp_tls"
require 'action_mailer'


class Notifier < ActionMailer::Base

ActionMailer::Base.smtp_settings = {
:address => "smtp.gmail.com",
:port => 587,
:authentication => :plain,
:user_name => "someone@openrain.com",
:password => "someonesPassword"
}

def Notifier.test_email(user_email)
subject "Free C1Alis"
from "system / example.com"
recipients user_email
body "Get large, #{user_email}!@"
end


end

Notifier.deliver_test_email('testuser / gmail.com')


i get a error undefined method `test_email' for #<Notifier:0x5e2b1fc>
but that is how it is defiened ever wehre. to do a
Class.deliver_methodname