This commit is contained in:
@@ -23,6 +23,7 @@ module ConversationReplyMailerHelper
|
||||
|
||||
def ms_smtp_settings
|
||||
return unless @inbox.email? && @channel.imap_enabled && @inbox.channel.provider == 'microsoft'
|
||||
return ms_graph_settings if ENV.fetch('AZURE_TENANT_ID', false)
|
||||
|
||||
smtp_settings = {
|
||||
address: 'smtp.office365.com',
|
||||
@@ -40,6 +41,15 @@ module ConversationReplyMailerHelper
|
||||
@options[:delivery_method_options] = smtp_settings
|
||||
end
|
||||
|
||||
def ms_graph_settings
|
||||
graph_settings = {
|
||||
token: @channel.provider_config['access_token']
|
||||
}
|
||||
|
||||
@options[:delivery_method] = :microsoft_graph
|
||||
@options[:delivery_method_options] = graph_settings
|
||||
end
|
||||
|
||||
def set_delivery_method
|
||||
return unless @inbox.inbox_type == 'Email' && @channel.smtp_enabled
|
||||
|
||||
|
||||
Reference in New Issue
Block a user