this is my first time using ActionMailer. I have a hard time set the sender email. This is my development.rb :
config.action_mailer.delivery_method = :smtp config.action_mailer.smtp_settings = { address: 'smtp.gmail.com', port: 587, user_name: 'foo', password: 'mypass', authentication: 'plain', enable_starttls_auto: true } config.action_mailer.raise_delivery_errors = true config.action_mailer.perform_deliveries = true And this is my feedback_mailer.rb :
class FeedbackMailer < ActionMailer::Base def feedback_email(feedback, setting_configuration) @feedback = feedback @setting_configuration = setting_configuration mail(to: @setting_configuration.value, :from => feedback.email, subject: @feedback.inquiry_type ) end end But the sender email is still [email protected]. Can I set the sender's email using smtp? Or I have to use sendmail? I tried using :sendmail, instead of smtp, but I have this error :
Errno::ENOENT - No such file or directory - /usr/sbin/sendmail -i -t -f What should I set in the sendmail? I tried googled it and everything, but nothing worked. Would be really glad, if anyone could help. Thanks