0

I'm getting error while the mail is getting deliver. When I changed the configuration in development.rb from proton mail to gmail for testing purpose then the email is getting sent. Meaning there's a particular problem in proton mail configuration.Does anyone have any idea then please reach out.

the mail is getting opened by "letter opener" but not getting delivered in inbox.

this is my development.rb

  config.action_mailer.delivery_method = :smtp
  config.action_mailer.perform_deliveries = true
  config.action_mailer.smtp_settings = {
  address: "smtp.protonmail.me",
  port: 587,
  domain: "proton.me",
  user_name: "User_name",
  password: "Password",
  authentication: "plain",
  enable_starttls_auto: true,
  openssl_verify_mode: 'peer'
}

the error is occurring when the mail is sent from controller

WineClubMailer.wine_allocation_email(customer,wine_club,wines).deliver_now

this is the mailer.rb

def wine_allocation_email(customer,wine_club,wines)
    @customer = customer
    @wine_club = wine_club
    @wines = wines
    mail(to: @customer.email, subject: 'Congratulations! Wines are allocated!', from: 'no-reply@example.com')
  end
  • Welcome to stackoverflow, i guess you should go through the documentation - https://stackoverflow.com/help/how-to-ask before writing any question on SO. otherwise your questions would be marked as canceled because it doesn't have enough context or its not in proper format – Vishal Apr 19 '23 at 12:45
  • Please do not post images of plaintext as [they are not appropriate on StackOverflow](https://meta.stackoverflow.com/a/285557/3784008). Please copy and paste plaintext into your question. – anothermh Apr 19 '23 at 15:47
  • The SMTP server is probably providing a meaningful response, which you can find in your rails server log. If you can't find the error, try configuring `config.action_mailer.raise_delivery_errors = true` or `config.action_mailer.logger` (https://guides.rubyonrails.org/v6.1/configuring.html). Also, try using a different SMTP client (MS Outlook, Apple Mail) to make sure your settings are correct, particularly re: authentication. – Jared Beck Apr 19 '23 at 22:54
  • @JaredBeck `config.action_mailer.raise_delivery_errors = true` it is already added in development.rb. Tried gmail SMTP server, the mail is getting delivered. – Prachi Jain Apr 20 '23 at 07:15
  • can you please add what error you are getting while sending email ? – Amol Mohite May 17 '23 at 13:41

0 Answers0