Ruby on Rails Tuesday, October 9, 2018

Hi Mike, Thank you for your reply,

 We want to configure Redhat Linux and Sendmail / Postfix

Please guide me how to configure via Postfix using my client mailer credentials (they're not providing user name and password)

Thanks & Regards
Prasanth

On Tue, Oct 9, 2018 at 12:57 PM Mike Simkins <mike.simkins@gmail.com> wrote:
You need to expand on 'AWS Server'

Do you mean a VM running Linux and Sendmail/Postfix??

Do you mean the AWS 'Simple Email Service'(SES)??

or something else ??

All the configs are different so....

On 8 Oct 2018, at 11:26, Prasanth Balan <prasanthrubyist@gmail.com> wrote:

No, We're using AWS server, my client only providing  :domain and :address

On Mon, Oct 8, 2018, 2:29 PM <faktsonly@gmail.com> wrote:
On Saturday, October 6, 2018 at 3:27:31 AM UTC-5, Prasanth Balan wrote:
Hi All,

I need to configure SMTP on production,My client only providing address, is that possible without user_name & password to configure SMTP ?

What is your host? If you are using Heroku you can configure SendGrid starter and it will provide a username and password for the mail server it creates for you.

Provision SendGrid like
heroku addons:create sendgrid:starter
Then grab your environment vars with
heroku config:get SENDGRID_USERNAME
heroku config:get SENDGRID_PASSWORD

More information can be found here: https://devcenter.heroku.com/articles/sendgrid 

To use the SMTP mailer you will need to setup an initializer class with something like the following:
So, in config/initializers/setup_mail.rb

ActionMailer::Base.delivery_method = :smtp
ActionMailer::Base.smtp_settings = {
:address => 'smtp.sendgrid.net',
:port => '587',
:authentication => :plain,
:user_name => ENV['SENDGRID_USERNAME'],
:password         => ENV['SENDGRID_PASSWORD'],
:domain => 'heroku.com',
:enable_starttls_auto => true
} 

 Create a mailer template and invoke from your controller of choice and you've got a working mail in production.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/8e4fac18-7433-44d6-bb7f-d67b6e49c552%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rubyonrails-talk/GOdg_ftrBzw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAEOjMEKciuJhfW%3DJSi%3DghasWrxkUyRrhg9FCDhvLZTe9ZQLmgQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/DF4200CF-82E9-483B-AD19-52149E937B01%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


--
Thanks & Regards
Prasanth Balan
9943400291

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAEOjMEL3frjTXjRekTVNFGSy2ddSB1Cj1QNada2x06zwgsP4nQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment