Fix unset SMTP_RETURN_PATH environment variable causing e-mail not to send (#17982)
				
					
				
			This commit is contained in:
		
							parent
							
								
									1b91359a45
								
							
						
					
					
						commit
						8c03b45fff
					
				@ -95,11 +95,12 @@ Rails.application.configure do
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  config.action_mailer.default_options = {
 | 
					  config.action_mailer.default_options = {
 | 
				
			||||||
    from: outgoing_email_address,
 | 
					    from: outgoing_email_address,
 | 
				
			||||||
    reply_to: ENV['SMTP_REPLY_TO'],
 | 
					 | 
				
			||||||
    return_path: ENV['SMTP_RETURN_PATH'],
 | 
					 | 
				
			||||||
    message_id: -> { "<#{Mail.random_tag}@#{outgoing_email_domain}>" },
 | 
					    message_id: -> { "<#{Mail.random_tag}@#{outgoing_email_domain}>" },
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  config.action_mailer.default_options[:reply_to]    = ENV['SMTP_REPLY_TO'] if ENV['SMTP_REPLY_TO'].present?
 | 
				
			||||||
 | 
					  config.action_mailer.default_options[:return_path] = ENV['SMTP_RETURN_PATH'] if ENV['SMTP_RETURN_PATH'].present?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  config.action_mailer.smtp_settings = {
 | 
					  config.action_mailer.smtp_settings = {
 | 
				
			||||||
    :port                 => ENV['SMTP_PORT'],
 | 
					    :port                 => ENV['SMTP_PORT'],
 | 
				
			||||||
    :address              => ENV['SMTP_SERVER'],
 | 
					    :address              => ENV['SMTP_SERVER'],
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user