Revert "feat: Support Azure single-tenant application using the Graph… (#7436)

This commit is contained in:
Pranav Raj S
2023-06-29 16:50:18 -07:00
committed by GitHub
parent 191b8a64fe
commit 022f4f899f
14 changed files with 13 additions and 451 deletions

View File

@@ -23,7 +23,6 @@ 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',
@@ -41,15 +40,6 @@ 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