-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Retrieve hostname for message-id as private var from 'from' address (… (
#49) * Retrieve hostname for message-id as private var from 'from' address (#45) * Fix message id * add unit test for message-id * Trigger build * Linux fixes
- Loading branch information
Showing
35 changed files
with
372 additions
and
640 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
![Swift-SMTP bird](https://github.com/IBM-Swift/Swift-SMTP/blob/master/Assets/swift-smtp-bird.png) | ||
|
||
Swift package for sending emails through an SMTP server. | ||
Swift package for sending emails to an SMTP server. | ||
|
||
[![Build Status](https://travis-ci.com/IBM-Swift/Swift-SMTP.svg?token=prrUzhsjZyXD9LxyWxge&branch=master)](https://travis-ci.com/IBM-Swift/Swift-SMTP.svg?token=prrUzhsjZyXD9LxyWxge&branch=master) | ||
![macOS](https://img.shields.io/badge/os-macOS-green.svg?style=flat) | ||
|
@@ -49,10 +49,10 @@ Create a `Mail` object and use your `smtp` handle to send it. To set the sender | |
let drLight = User(name: "Dr. Light", email: "[email protected]") | ||
let megaman = User(name: "Megaman", email: "[email protected]") | ||
|
||
let mail = smtp.makeMail(from: drLight, | ||
to: [megaman], | ||
subject: "Humans and robots living together in harmony and equality.", | ||
text: "That was my ultimate wish.") | ||
let mail = Mail(from: drLight, | ||
to: [megaman], | ||
subject: "Humans and robots living together in harmony and equality.", | ||
text: "That was my ultimate wish.") | ||
|
||
smtp.send(mail) { (err) in | ||
if let err = err { | ||
|
@@ -67,12 +67,12 @@ Add Cc and Bcc: | |
let roll = User(name: "Roll", email: "[email protected]") | ||
let zero = User(name: "Zero", email: "[email protected]") | ||
|
||
let mail = smtp.makeMail(from: drLight, | ||
to: [megaman], | ||
cc: [roll], | ||
bcc: [zero], | ||
subject: "Robots should be used for the betterment of mankind.", | ||
text: "Any other use would be...unethical.") | ||
let mail = Mail(from: drLight, | ||
to: [megaman], | ||
cc: [roll], | ||
bcc: [zero], | ||
subject: "Robots should be used for the betterment of mankind.", | ||
text: "Any other use would be...unethical.") | ||
|
||
smtp.send(mail) | ||
``` | ||
|
@@ -99,10 +99,10 @@ let dataAttachment = Attachment(data: data, | |
inline: false) // send as a standalone attachment | ||
|
||
// Create a `Mail` and include the `Attachment`s | ||
let mail = smtp.makeMail(from: from, | ||
to: [to], | ||
subject: "Check out this image and JSON file!", | ||
attachments: [htmlAttachment, dataAttachment]) // attachments we created earlier | ||
let mail = Mail(from: from, | ||
to: [to], | ||
subject: "Check out this image and JSON file!", | ||
attachments: [htmlAttachment, dataAttachment]) // attachments we created earlier | ||
|
||
// Send the mail | ||
smtp.send(mail) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.