jeudi 6 août 2015

how to send email to gmail hotmail and so on, from localhost (rails app) server without authentication

config.action_mailer.raise_delivery_errors = true

  ActionMailer::Base.smtp_settings = {
   :address => "smtp.gmail.com",
   :port => 587,
   :domain => 'gmail.com',
   :authentication => :plain,
   :user_name=> username@domain.com,
   :password=> passwdher,
   :enable_starttls_auto => true
}

This works fine with mail gem, but I want to send the mail to the respective user(example@gmail.com or example@hotmail.com) using localhost where the rails app is running. Is there any way to do it?

I heard of mailcatcher gem, my understanding about the gem is that it maintains a local smtp server and sends mails to that, but I want to send the mail to a respective user instead of smpt server.

After sending the mail to the smpt server, can I send it to a user using that smpt server ? Need help guys

Thank you.

Aucun commentaire:

Enregistrer un commentaire