ActionMailer problem

Hi guys!

I used action mailer in my project,in that the from ID show always my
own
ID.I need it show some default ID like.,[email protected]

Here my coding,

In my set_mailer.rb

ActionMailer::Base.smtp_settings = {
:address => “smtp.gmail.com”,
:port => 587,
:domain => “gmail.com”,
:user_name => “My_personal_ID”,
:password => “********”,
:authentication => “plain”,
:enable_starttls_auto => true
}

Here my mailer code:

class EmployeeMailer < ActionMailer::Base
default from: “[email protected]
def employee_creation(user)
@employee=user
attachments[“logo.png”] =
File.read("#{Rails.root}/app/assets/images/logo.png")
mail(:to => user.eamil, :subject => “Registered”)
end
end

Please give the solution…!!

On Aug 8, 2012, at 9:57 AM, Maddy wrote:

:port => 587,
default from: “[email protected]
def employee_creation(user)
@employee=user
attachments[“logo.png”] =
File.read("#{Rails.root}/app/assets/images/logo.png")
mail(:to => user.eamil, :subject => “Registered”)
end
end

Please give the solution!

Read this page: http://guides.rubyonrails.org/action_mailer_basics.html

Walter

!

Thank you Walter…

On Thu, Aug 9, 2012 at 7:47 PM, Walter Lee D. [email protected]
wrote:

In my set_mailer.rb

end


You received this message because you are subscribed to the Google G.
“Ruby on Rails: Talk” group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit https://groups.google.com/groups/opt_out.

“Attitude is a little thing that makes a big difference”

Thanks & Regards
Ashokkumar.Y
*ROR-Developer
*email : [email protected]

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs