-
A UUID for the mail.
Declaration
Swift
public let uuid: String
-
Subject of the
Mail
. Defaults to none.Declaration
Swift
public let subject: String
-
Text of the
Mail
. Defaults to none.Declaration
Swift
public let text: String
-
Array of
Attachment
s for theMail
. If theMail
has multipleAttachment
s that are alternatives to plain text, the last one will be used as the alternative (all theAttachments
will still be sent). Defaults to none.Declaration
Swift
public let attachments: [Attachment]
-
Attachment that is an alternative to plain text.
Declaration
Swift
public let alternative: Attachment?
-
Additional headers for the
Mail
. Header keys are capitalized and duplicate keys will overwrite each other. Defaults to none. The following will be ignored: CONTENT-TYPE, CONTENT-DISPOSITION, CONTENT-TRANSFER-ENCODING.Declaration
Swift
public let additionalHeaders: [String : String]
-
Declaration
Swift
public var id: String { get }
-
Hostname from the email address.
Declaration
Swift
public var hostname: String { get }
-
Initializes a
Mail
object.Declaration
Swift
public init(from: User, to: [User], cc: [User] = [], bcc: [User] = [], subject: String = "", text: String = "", attachments: [Attachment] = [], additionalHeaders: [String: String] = [:])
Parameters
from
The
User
that theMail
will be sent from.to
Array of
User
s to send theMail
to.cc
Array of
User
s to cc. Defaults to none.bcc
Array of
User
s to bcc. Defaults to none.subject
Subject of the
Mail
. Defaults to none.text
Text of the
Mail
. Defaults to none.attachments
Array of
Attachment
s for theMail
. If theMail
has multipleAttachment
s that are alternatives to plain text, the last one will be used as the alternative (all theAttachments
will still be sent). Defaults to none.additionalHeaders
Additional headers for the
Mail
. Header keys are capitalized and duplicate keys will overwrite each other. Defaults to none. The following will be ignored: CONTENT-TYPE, CONTENT-DISPOSITION, CONTENT-TRANSFER-ENCODING. -
Represents a sender or receiver of an email.
See moreDeclaration
Swift
public struct User