1
0
Fork 0

Configure ActionMailer using SendGrid

This commit is contained in:
Alex Kotov 2018-12-04 00:15:21 +05:00
parent c0f0c4ac1b
commit 5a0e013617
No known key found for this signature in database
GPG key ID: 4E831250F47DE154
4 changed files with 21 additions and 6 deletions

View file

@ -1 +1 @@
TSbQOATv5nRBX1MV+PYqLxzGz2yuyJTgJRqODhGozanX0opBcAD/4ytZNeYwDxx5QYwtzbszrYL9fQNYKSIXv3PXpRV0s1fcQeBhpXJ0iO1DJDMpDfVPg4yI3bC8EgtrYhaifr5+BJ+vvaYmGhyTpTkyOewFYMSR8jvO00inX0eRL8y0DheJ1Rxc51uOYcufSNRHxNk7aVKBvtD2AXZeYYOLH9cHjFLMMGx+hjx64PKGSU/9mUmqYzwgSy49H5Hg8N7p7NJ5KRWzs3F8IJAtB6TZc/wx2ooUFGF6XUvX77Oj6KdTYshYQMntOZuCssH8fIOHDz/4zWUqx3vmOUZBYuOJ5a3K/5a2n+jNPzy6xJqiZE8qOkxB0Hh1uGP3WXnbUVWxx7v/SzHH1VOXmHA0aew2jKXw/Q3bmQRXFHXPniGhbmlF+4RRokeQ0JnZQDWf7GsvuH8QN3gmsD+Nv3KUaLrq07IZ9LHJh71zi/skw3g8V+mul55Ug4Lxv7huKLq5MDLyGiexc5SQHh8ZvlJn0gYmwIDv3mLEZD2R/I6siB+QG+EB8MRxNuEEiopnS68VA48l4GAcz0RMCkbabst9OSGeNoSv4DUsCuZAnEY3i50JIquCwk2uxSvYN3frcuT0XIaFYzXCQzuhrWmTWHlRAzWwVTfF2DZoXtQYaxc6bUm8zkQc9UHrhTAp8Bo1CwEtyiAGUGFcoMXwsROyx004HQGSuA==--8cP8D3yOs0E/Tzjd--QUhdC0bSBBCl+AY7UrS6/g== bZOlgOLwBLClIf2KiAw7GBYIt9JEgvMzMPGnQsR5yyYqdAB3zklFmqs9RnRKfAobUdhrN7oCTr4cweOlN3icvVY1ApaH8dvqEKXEfQRkKwQBLM3weCvhrEe35001egI9NuEPiL09H7U3OS/LcGfMvAVKPI3sfJ8s7L3IHfkbg0mlemVWw/NBbHBIPBn1rv7YOwmg91SIoE/lZJlubNDo7q2kVPZBv5UcUsee1tCU0Y2anj/QIioMvOASWEMZNMGgmnaAm7D0PqqrPkcj4gkvGoJHsyH3I+lK9glxxdExoMO40zuKCIqq3l+fh2L7tGdNcv8LmLFU16XtwOyymQanGlkeRP80fQdk3/b5vJbHWF+EvFit6e0Yd63Ghw8xx4VT8/8fgLiuUlvWf+Sg8VbIOWR9yvOOMLBEyrQj2zP6qyU8La7E0XzGD8n2FKfeKPhes8vGkrBzVGsV+0elOAX3h2V0OR/k4dBBPM59f7l3Rh/hZCbL7Sz4Ez0NmH+Jrzgztrl8jQLnL+fVGMZ3MTc2/NesMqgYlxPnLooH0Bgdkf5OIIP88L5e/IxOKJ9zE5E0tI37WM1tniOGLHDDw21CHJMu3zZhA2mhQl1Ay2rQQFYJmZui1+VAAroaNo8Vz/Q9oDL4NdoUvrKB1hm7avQg3s5llVjE3PDMXeZYs1LtVoIfnmfLK9yqROwzSaUUwyfTQjTcYC58fg27O376NpbVU9ozPoYWfqfKnN7ktbSjXrbs6LiTbJjHaKnQvK5YNnji0MMK8/KyMqflTaKq8895tMRdYuMnuP7tJxhhc2hGdtvLNReJUNpRD0Wf6PC5T9Nw8Z16yGX2CxeJOMQ=--WeveLem9LZdtr6sE--KaO5jSvAV0jFvarkJ4HXzg==

View file

@ -72,13 +72,13 @@ Rails.application.configure do
# config.active_job.queue_adapter = :resque # config.active_job.queue_adapter = :resque
# config.active_job.queue_name_prefix = "partynest_#{Rails.env}" # config.active_job.queue_name_prefix = "partynest_#{Rails.env}"
# Send mail with SMTP.
config.action_mailer.delivery_method = :smtp
config.action_mailer.default_url_options = { host: 'lpr-perm.com' }
config.action_mailer.perform_deliveries = true
config.action_mailer.raise_delivery_errors = true
config.action_mailer.perform_caching = false config.action_mailer.perform_caching = false
# Ignore bad email addresses and do not raise email delivery errors.
# Set this to true and configure the email server for immediate delivery
# to raise delivery errors.
# config.action_mailer.raise_delivery_errors = false
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
# the I18n.default_locale when a translation cannot be found). # the I18n.default_locale when a translation cannot be found).
config.i18n.fallbacks = true config.i18n.fallbacks = true

View file

@ -39,6 +39,8 @@ Rails.application.configure do
# ActionMailer::Base.deliveries array. # ActionMailer::Base.deliveries array.
config.action_mailer.delivery_method = :test config.action_mailer.delivery_method = :test
config.action_mailer.default_url_options = { host: 'localhost', port: 3000 } config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }
config.action_mailer.perform_deliveries = true
config.action_mailer.raise_delivery_errors = true
config.action_mailer.perform_caching = false config.action_mailer.perform_caching = false
# Print deprecation notices to the stderr. # Print deprecation notices to the stderr.

View file

@ -0,0 +1,13 @@
# frozen_string_literal: true
# Be sure to restart your server when you modify this file.
ActionMailer::Base.smtp_settings = {
user_name: 'apikey',
password: Rails.application.credentials.sendgrid_api_key,
domain: 'lpr-perm.com',
address: 'smtp.sendgrid.net',
port: 587,
authentication: :plain,
enable_starttls_auto: true,
}