Skip to content

Commit

Permalink
Fix mailer issue
Browse files Browse the repository at this point in the history
  • Loading branch information
julianguyen committed May 14, 2022
1 parent 1d26279 commit efc0369
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/mailers/application_mailer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class ApplicationMailer < ActionMailer::Base
include ApplicationMailerHelper
include NotificationMailerHelper
include GroupNotificationHelper
default from: ENV['SMTP_ADDRESS']
default from: ENV['SMTP_FROM']
layout 'mailer'
ALLY_NOTIFY_TYPES = %w[new_ally_request accepted_ally_request].freeze

Expand Down
2 changes: 1 addition & 1 deletion app/mailers/banned_mailer.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true
class BannedMailer < ApplicationMailer
default from: ENV['SMTP_ADDRESS']
default from: ENV['SMTP_FROM']

def add_ban_email(recipient)
@recipient = recipient
Expand Down
2 changes: 1 addition & 1 deletion app/mailers/notification_mailer.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

class NotificationMailer < ApplicationMailer
default from: ENV['SMTP_ADDRESS']
default from: ENV['SMTP_FROM']

def take_medication(reminder)
return if reminder.medication.blank?
Expand Down
2 changes: 1 addition & 1 deletion app/mailers/report_mailer.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true
class ReportMailer < ApplicationMailer
default from: ENV['SMTP_ADDRESS']
default from: ENV['SMTP_FROM']

def reported_email(recipient, reportee)
@recipient = recipient
Expand Down
3 changes: 2 additions & 1 deletion config/env/development.example.env
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ PUSHER_SECRET=""
PUSHER_CLUSTER=""

# SMTP
SMTP_ADDRESS="test@test.com"
SMTP_FROM="test@test.com"
SMTP_ADDRESS=""
SMTP_PORT=""
SMTP_USER_NAME=""
SMTP_PASSWORD=""
Expand Down
3 changes: 2 additions & 1 deletion config/env/test.example.env
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ PUSHER_SECRET=""
PUSHER_CLUSTER=""

# SMTP
SMTP_ADDRESS="test@test.com"
SMTP_FROM="test@test.com"
SMTP_ADDRESS=""
SMTP_PORT=""
SMTP_USER_NAME=""
SMTP_PASSWORD=""
Expand Down
2 changes: 1 addition & 1 deletion config/initializers/devise.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# Configure the e-mail address which will be shown in Devise::Mailer,
# note that it will be overwritten if you use your own mailer class
# with default "from" parameter[:
config.mailer_sender = ENV['SMTP_ADDRESS']
config.mailer_sender = ENV['SMTP_FROM']

# Configure the class responsible to send e-mails.
config.mailer = 'CustomDeviseMailer'
Expand Down

0 comments on commit efc0369

Please sign in to comment.