Class: Msgraph::Api::NonMultipartInterceptor

Inherits:
Object
  • Object
show all
Defined in:
lib/msgraph/api/non_multipart_interceptor.rb

Class Method Summary collapse

Class Method Details

.delivering_email(message) ⇒ Object



4
5
6
7
8
9
10
11
12
13
# File 'lib/msgraph/api/non_multipart_interceptor.rb', line 4

def self.delivering_email(message)
  if !message.multipart?
    # multipart mails are rendered correctly, as the encoding
    # ships with every part of the mail. But I think in case of
    # single part messages, exchange is guessing the encoding
    # ... and gets it totally wrong. So we force UTF-8 for
    # mail transport and MS Graph API is happy with that.
    message.transport_encoding = Encoding::UTF_8
  end
end