Reputation: 1333
Hi I am trying to send an Email with a PDF Attachment using sendmail
and also added below line in configuration file to raise delivery errors
config.action_mailer.raise_delivery_errors = true
and here is my code which I written for attachemnt
def site_launch(email,name)
@name = name
attachments["checkinforgood_manual_deck.pdf"] = File.read(Rails.root.join('public/images/posters/cmanual_deck2.pdf'))
mail(:from => "[email protected]",
:to => [email protected],
:subject => 'Make your good Fundraiser amazing.')
end
not able to understand what I am doing wrong here. email is not delivering me and neither raise errror too. but in Log is showing get delivered.
Upvotes: 0
Views: 611
Reputation: 471
Actually, you're application is running in development mode. To send mail in actual application must be in production mode. So, in development mode you'll get log generated, only. I hope this will explain something.
Upvotes: 1