Closed ab00zar closed 7 years ago
These mailer settings wouldn't conflict with devise they only apply to the contact mailer. I'm not entirely clear on your problem / error, but it appears to be a configuration issue. You should set a config.mailer_from to something other than nil.
In the sample application it's nil!! Also, it works when it's nil and in the contact_us form I enter hi@mysite.com (which is default sender for Devise and another Mailer) as the user's email!! It's strange!
Sorry been awhile since I've configured this, and you're correct it can be nil
because it'll fallback to whatever the email entered is: https://github.com/JDutil/contact_us/blob/master/app/mailers/contact_us/contact_mailer.rb#L5
I'm not sure what email provider you're using, but some like Amazon SES require that the sending email addresses be verified. In that case you're able to set the from address as noted in the config: https://github.com/JDutil/contact_us_demo/blob/master/config/initializers/contact_us.rb#L6
If you want to or are required to have all your contact emails sent from hi@mysite.com
I would set it in the config.mailer_from configuration.
I got the error because I need the users' email. So, I have to find a solution to prevent it from conflicting with other mailer senders.
It seems that it has conflict with other mailers. Please, visit this question here: http://stackoverflow.com/questions/41147744/rails-contact-us-netsmtpfatalerror-550-your-from-address
I explained it. I have also "config.mailer_sender" in my devise.rb. It might be another source of conflict!!