Serkan Serkan
2007-Nov-17 12:36 UTC
ActionMailer 501: sender address must contain a domain
Hi there guys!
Im copying an email example from "Agile web development with rails",
but
i keep getting a "501: sender address must contain a domain" error.
Heres my code in my enviroment.rb. Real values replaced with
"something":
[code]
config.action_mailer.delivery_method = :smtp
config.action_mailer.default_charset ="utf-8"
config.action_mailer.perform_deliveries = true
config.action_mailer.raise_delivery_errors = true
config.action_mailer.server_settings = {
:address => "something.something.net",
:port => 25,
:domain => "something.com",
:user_name =>
"something-f52GMkFzgz/6V6G2DxALlg@public.gmane.org",
:password => "something",
:authentication => :login
}
[/code]
And heres my method:
[code]
def confirm(customer)
@subject = ''Sign up verification''
@body["customer"] = customer
@recipients = customer.email
@from = ''SilverSky''
@sent_on = Time.now
end
def send_mail
customer = Customer.find_by_firstname("erkan1")
email = CustomerMailer.create_confirm(customer)
email.set_content_type("text/html")
if CustomerMailer.deliver(email)
render(:text => "Thank you" )
end
[/code]
Any help would be greatly appreciated! This is getting me down!
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
George Bailey
2007-Nov-17 14:29 UTC
Re: ActionMailer 501: sender address must contain a domain
On Nov 17, 2007, at 6:36 AM, Serkan Serkan wrote:> > Hi there guys! > > Im copying an email example from "Agile web development with rails", > but > i keep getting a "501: sender address must contain a domain" error. > > @from = ''SilverSky''There''s your problem. That needs to be an email address. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Serkan Serkan
2007-Nov-17 14:35 UTC
Re: ActionMailer 501: sender address must contain a domain
it works!! thank you George!!! thanks so much!!! -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---