Releases: Kitura/Swift-SMTP
Releases · Kitura/Swift-SMTP
Only support Swift 4.0.3
Thanks to @Davidde94.
Add Swift 4 Support
Swift4 (#53) * Add Swift 4 support * add swift 4 support * change swift version
Fix message-id, revert previous breaking API changes
Many thanks to @leanne63 for her work on this!
Mail
structs no longer require ahostname
for initialization- removed
makeMail()
function inSMTP
struct
Improve connect with timeout
NOTE: The timeout
parameter in initializing an SMTP
handle is now a UInt
.
Attempting to connect to a server should now correctly timeout and return an error when appropriate.
Mail objects require a hostname to init
[See #41]
Breaking API change for initializing a Mail
object:
- Initializing a
Mail
object now requires ahostname
to be provided.
New API for the SMTP
struct:
makeMail()
: create aMail
object. It'shostname
will be set to theSMTP
struct's hostname.
SSL and additional headers changes
- SSL
- If an SSL connection is required,
Swift-SMTP
will automatically attempt to upgrade the connection without a need for the user to specify anSSL
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.
- If an SSL connection is required,
- Additional headers:
CONTENT-TYPE
,CONTENT-DISPOSITION
,CONTENT-TRANSFER-ENCODING
headers added inadditionalHeaders
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 bySwift-SMTP
--plaintext/html should render correctly in the body of emails.Attachment
s will also have theirCONTENT-TYPE
correctly set bySwift-SMTP
.- For
CONTENT-DISPOSITION
, set theinline
flag in the initialization of anAttachment
if you need to customize this - Users should not need to change
CONTENT-TRANSFER-ENCODING
Default headers for plain text mail content
- For plain text content of an email, these default headers are added:
CONTENT-TYPE: text/html; charset=utf-8
CONTENT-TRANSFER-ENCODING: 7bit
CONTENT-DISPOSITION: inline
- These headers can be overwritten by the user with the
additionalHeaders
dictionary- This is usually not recommended as any headers in
additionalHeaders
are applied to the entire email, so multi content-type emails will be rendered incorrectly. This will be noted in the docs.
- This is usually not recommended as any headers in
- Additional changes to the other content types (
mixed
,alternative
,related
) will also be made so that the defaultCONTENT-TYPE
header can be overwritten as well (but again, not recommended)
Dependency graph issue, plain text header issues
- added
.git
. toBlueCryptor
url inPackage.swift
- removed hard coded header in plain text content of emails
Change logging levels, headers can now be overwritten
SMTPSocket
logging level is now atdebug
level (you will no longer see the logs onverbose
level)- A
Mail
's orAttachment
'sadditionalHeaders
is now a dictionary. This means headers can be overwritten. Note that all header keys are capitalized.
Add Swift 4 support
swift-4.0-DEVELOPMENT-SNAPSHOT-2017-06-11-a