From a80adb63978c7a21d3a02422741a72e63d472032 Mon Sep 17 00:00:00 2001 From: Ian Mitchell Date: Mon, 18 Mar 2024 14:57:39 -0700 Subject: [PATCH] Add Resend --- Gemfile | 2 ++ config/environments/production.rb | 12 ++---------- config/initializers/resend.rb | 1 + 3 files changed, 5 insertions(+), 10 deletions(-) create mode 100644 config/initializers/resend.rb diff --git a/Gemfile b/Gemfile index f616b90..be39a5f 100644 --- a/Gemfile +++ b/Gemfile @@ -33,6 +33,8 @@ gem "aws-sdk-s3", require: false gem 'acts_as_list' +gem "resend" + # Use Active Model has_secure_password # gem 'bcrypt', '~> 3.1.7' diff --git a/config/environments/production.rb b/config/environments/production.rb index fde3612..101f08e 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -123,16 +123,8 @@ # Devise Emails config.action_mailer.default_url_options = { host: 'deschtimes.com' } - # Sendgrid Configuration - ActionMailer::Base.smtp_settings = { - :user_name => 'apikey', - :password => ENV['SENDGRID_API_KEY'], - :domain => 'deschtimes.com', - :address => 'smtp.sendgrid.net', - :port => 587, - :authentication => :plain, - :enable_starttls_auto => true - } + # Resend Configuration + config.action_mailer.delivery_method = :resend # Active Storage links for Webhooks Rails.application.routes.default_url_options[:host] = 'deschtimes.com' diff --git a/config/initializers/resend.rb b/config/initializers/resend.rb new file mode 100644 index 0000000..e9db3bb --- /dev/null +++ b/config/initializers/resend.rb @@ -0,0 +1 @@ +Resend.api_key = ENV['RESEND_API_KEY']