No letters of confirmation have been received. How to configure it?

Action Mailer is configured as follows in development.rb :

 config.action_mailer.delivery_method = :sendmail config.action_mailer.perform_deliveries = true config.action_mailer.raise_delivery_errors = true config.action_mailer.default_url_options = { :host => 'localhost:3000' } 

This should work according to the Rails Guides and all the additional information I managed to find on the Internet. When I searched for my specific problem, I basically found solutions for SMTP configurations.

What am I missing?

Update:

For my reasons, all my emails are delivered via /var/mail/root .

+4
source share
2 answers

Do you have sendmail installed on your development machine? Try this on the command line:

 which sendmail 

If I were you, I would not send emails in development mode, but if you want to do this, register with your gmail.com account and use this:

 config.action_mailer.delivery_method = :smtp config.action_mailer.smtp_settings = { :enable_starttls_auto => true, :address => "smtp.gmail.com", :port => 587, :domain => "gmail.com", :authentication => :login, :user_name => "<your username>@gmail.com", :password => "<your password>", } 
+8
source

cannot be the domain that sendmail is used so change the configuration in devise.rb

 config.mailer_sender = " no-reply@other-domain.com " 

check the mail log below

 tail -f /var/log/mail.log 

luck

0
source

Source: https://habr.com/ru/post/1334002/


All Articles