邮件/开发.rb
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
:adress => 'myemail@gmail.com',
:port => 25,
:authentication => :login,
:user_name => 'myemail',
:password => 'secret'
}
这是我的邮件:
class UserMailer < ActionMailer::Base
def welcome_email(name, email, subject, question)
@recipients = email
@from = "myemail@gmail.com"
headers "Reply-to" => "myemail0@gmail.com"
@subject = "Welcome to MyDomain"
@sent_on = Time.now
@content_type = "text/html"
#body[:username] = name
mail(:to => email, :subject => subject, :from => 'myemail@gmail.com')
end
end
有这个错误:504 5.3.3 AUTH mechanism LOGIN not available
请帮助,在此先感谢。