Skip to content

SSL and additional headers changes

Compare
Choose a tag to compare
@quanvo87 quanvo87 released this 17 Jul 16:19
· 62 commits to master since this release
  • SSL
    • If an SSL connection is required, Swift-SMTP will automatically attempt to upgrade the connection without a need for the user to specify an SSL configuration
    • With this default configuration, no backing certificates are used for the client's side of the SSL handshake with the SMTP server
    • View docs on the SSL struct for more configuration options, like adding a certificate chain, etc.
  • Additional headers:
    • CONTENT-TYPE, CONTENT-DISPOSITION, CONTENT-TRANSFER-ENCODING headers added in additionalHeaders will now be ignored. Allowing them to be overwritten causes errors for some SMTP servers and mail content to render incorrectly.
      • CONTENT-TYPE will be set by Swift-SMTP--plaintext/html should render correctly in the body of emails. Attachments will also have their CONTENT-TYPE correctly set by Swift-SMTP.
      • For CONTENT-DISPOSITION, set the inline flag in the initialization of an Attachment if you need to customize this
      • Users should not need to change CONTENT-TRANSFER-ENCODING