MantisBase v0.4.9
Loading...
Searching...
No Matches
mb::smtp_detail Namespace Reference

Functions

void deliver (const MbSmtpConfig &config, const std::string &mailFrom, const std::string &rcptTo, std::string payload)

Function Documentation

◆ deliver()

void mb::smtp_detail::deliver ( const MbSmtpConfig & config,
const std::string & mailFrom,
const std::string & rcptTo,
std::string payload )

Deliver one RFC 5322 message over SMTP. The TCP connection is a trantor TcpClient. TLS (implicit on port 465, otherwise STARTTLS) is performed with wolfSSL because trantor is built without its own TLS provider.

Parameters
mailFromEnvelope sender, without angle brackets.
rcptToEnvelope recipient, without angle brackets.
payloadBytes to send after the server accepts DATA, including the terminating .\r\n.
Exceptions
MbException502 on DNS, connection, TLS, or protocol failure.