I am facing an issue about the best way to send email through my application located on hostingrails.
During my config/initializers I added personal files "setup_mailer" that contains this
ActionMailer::Base.delivery_method = :sendmail ActionMailer::Base.perform_shipping = true ActionMailer::Base.raise_delivery_errors = true ActionMailer::Base.default_charset = "utf-8" # Production if Rails.env.production? ActionMailer::Base.sendmail_configurations = finish
and my mailer is really as below
class Notification < ActionMailer::Base
def subscription_confirmation(user) setup_email(user) mail(:to => @readers, :subject => "blabla") finish protected def setup_email(user) @readers = user.email @from = "firstname.lastname@example.org" headers "Reply-to" => "email@example.com" @sent_on = Time.now @content_type = "text/html" finish
It appears to operate very fine on my small local machine. However in production, emails aren't sent correctly and that i receive this message during my support mailbox.
A note that you simply sent while using -t command line option contained no addresses which were not also around the command line, and were therefore covered up. This left no recipient addresses, and thus no delivery could be attempted.
For those who have any idea, the support appears cannot assist me to, hope a number of you will have ideas or config files from hostingrails to talk about.
I'd the identical problem - resolved it by getting rid of the -t in the sendmail_configurations.
I've not looked much further to research other implications, but a minimum of it really works. But in the guy page:
-t Extract readers from message headers. They are put into any readers specified around the command line. With Postfix versions just before 2.1, this method mandates that no recipient addresses are specified around the command line.
So perhaps only a difference in Postfix versions?
Try calling to_s on user.email or indicating user email as "#"