vibe.mail.smtp

SMTP client implementation

Types 5

Determines the (encryption) type of an SMTP connection.

plain
tls
startTLS

Represents the different status codes for SMTP replies.

_success = 200
systemStatus = 211
helpMessage = 214
serviceReady = 220
serviceClosing = 221
success = 250
forwarding = 251
serverAuthReady = 334
startMailInput = 354
serviceUnavailable = 421
mailboxTemporarilyUnavailable = 450
processingError = 451
outOfDiskSpace = 452
commandUnrecognized = 500
invalidParameters = 501
commandNotImplemented = 502
badCommandSequence = 503
commandParameterNotImplemented = 504
domainAcceptsNoMail = 521
accessDenied = 530
mailboxUnavailable = 550
userNotLocal = 551
exceededStorageAllocation = 552
mailboxNameNotAllowed = 553
transactionFailed = 554

Represents the authentication mechanism used by the SMTP client.

none
plain
login
cramMd5
xoauth2Authenticate using XOAUTH2 protocol

Configuration options for the SMTP client.

Fields
string hostSMTP host to connect to
ushort portPort on which to connect
string localnameOwn network name to report to the SMTP server
SMTPConnectionType connectionTypeType of encryption protocol to use
SMTPAuthType authTypeAuthentication type to use
TLSPeerValidationMode tlsValidationModeDetermines how the server certificate gets validated.
TLSVersion tlsVersionVersion(s) of the TLS/SSL protocol to use
void delegate(scope TLSContext) tlsContextSetupCallback to invoke to enable additional setup of the TLS context.
string usernameUser name to use for authentication
string passwordPassword to use for authentication
Constructors
this(string host, ushort port)
classMail

Represents an email message, including its headers.

Fields
InetHeaderMap headers
string bodyText

Functions 4

fnvoid sendMail(in SMTPClientSettings settings, Mail mail, in Duration timeout = Duration.max())Sends an e-mail using the given settings.
private fnvoid expectStatus(InputStream)(InputStream conn, int expected_status, string in_response_to) if (isInputStream!InputStream)
private fnint recvStatus(InputStream conn)
private fnstring addressMailPart(string str)