sending email with mail gem in rails3

I have used this code for sending mail, but i didn’t get the mail from this

require 'rubygems’

require 'mail’

I dont know about that gem, but I dont see anything like mail.send! Look into the docs and look up which function you have to call for sending the message.

yes i have edited the code like this

mail = Mail.new do

from 'mail@mofobi.com’

to '#{@business.email}'

subject 'Here is the image you wanted’

body 'body’

can you post the role stack fo errors please.

At first everything seems ok. I’m gessing that maybe just some configuration error.

If you can’t resolve with that gem the ActionMailer gem doesn’t solve your problem? There is a good documentation of the ActionMailer here http://guides.rubyonrails.org/action_mailer_basics.html

att,

can you post the role stack fo errors please.

At first everything seems ok. I’m gessing that maybe just some configuration error.

If you can’t resolve with that gem the ActionMailer gem doesn’t solve your problem? There is a good documentation of the ActionMailer here http://guides.rubyonrails.org/action_mailer_basics.html

Finally i got it, when using via SMTP like this

environment.rb

ActionMailer::Base.smtp_settings = {

:address => “smtp.gmail.com”,

:port => 587,

:domain => ‘your.host.name’,

:user_name => ‘username’,

:password => ‘password’,

:authentication => ‘plain’,

:enable_starttls_auto => true }