I want to generate Email from my ruby application, So i used Action mail class for that.
I configured the Email setting on environment.rb my configuration is as follows
ActionMailer::Base.raise_delivery_errors = false
ActionMailer::Base.delivery_method = :smtp
ActionMailer::Base.smtp_settings = {
:address => "mail.authsmtp.com",
:port => 2525,
:user_name => "*******",
:password => "*******",
:authentication => :login
}
My mailer model is TestMailer,so i decided to check the mail operation so define method on TestMailer.rb.
def test_mail(to) {
subject "My first email!"
recipients "#{to}"
from 'test'
charset "utf-8"
content_type 'text/html'
body "Testing one two three..."
}
I opened the ruby Script/console and called the test_mail method by TestMailer.deliver_test_mail("[email protected]")
.
It is not generating the email. In the application server log its generates the email template.
I have no clue whats is the probs here .