Ruby on Rails Friday, October 6, 2017

Oh, I almost forgot.  There are necessary additions needed to send mail from your production environment (heroku in my case).

I used the gem 'sendgrid-ruby'... 

You need to add the sendgrid resource on heroku (enable it)

need to add this configuration to the production environment...

config.action_mailer.default_url_options = { :host => 'www.jginfosys.com', :protocol => 'https'
}

and added this to the ... environment.rb


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

Of course, change your host and domain to match yours.

On Wednesday, September 27, 2017 at 6:32:03 PM UTC-4, Joe Guerra wrote:
Just curious, I'd like to shoot off a notification message once a form has been entered on my site.

I guess it's easy enough to figure out.  Do I just create a mailer and call that task once it's completed?
(sorry I haven't worked with any mailers yet.)

Thanks,
Joe

--
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/301cf418-e2b5-44ce-a1ce-e57fbcd82e51%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment