Ruby on Rails
Tuesday, October 23, 2018
Thank you Mike, it's working now
On Tue, Oct 9, 2018 at 4:04 PM Mike Simkins <mike.simkins@gmail.com> wrote:
--It is all fairly well explained in the rails guides however:If your mailer is on the same box as your web app use something like......config.action_mailer.delivery_method = :sendmailconfig.action_mailer.perform_deliveries = trueconfig.action_mailer.raise_delivery_errors = trueconfig.action_mailer.default_options = { from: 'myapp@mydomain.com' }If the sendmail instance is running on a different box, then you have to use SMTP.Delete the first line above (:sendmail), and replace withconfig.action_mailer.delivery_method = :smtpconfig.action_mailer.smtp_settings = {port: 25, # might be 587address: 'mymailer.domain.com'}Hi Mike, Thank you for your reply,We want to configure Redhat Linux and Sendmail / PostfixPlease guide me how to configure via Postfix using my client mailer credentials (they're not providing user name and password)Thanks & RegardsPrasanthOn 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....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 likeheroku addons:create sendgrid:starter
Then grab your environment vars withheroku 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.rbActionMailer::Base.delivery_method = :smtpActionMailer::Base.smtp_settings = {:port => '587',:authentication => :plain,:user_name => ENV['SENDGRID_USERNAME'],:password => ENV['SENDGRID_PASSWORD'],: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 & RegardsPrasanth Balan
9943400291
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/CAEOjMEL3frjTXjRekTVNFGSy2ddSB1Cj1QNada2x06zwgsP4nQ%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/F17EE842-CE3F-4C49-A97E-DD37A6D93F7B%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
Thanks & Regards
Prasanth Balan9943400291
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/CAEOjMELrOjcnkkJH%3DPWyXBELaQZkL9-Y0poxDM0ZvCranA3hEg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment