WordPress at a glance
function is not described


SMTP::mail() public WP 1.0

Send an SMTP MAIL command. Starts a mail transaction from the email address specified in $from. Returns true if successful or false otherwise. If True the mail transaction is started and then one or more recipient commands may be called followed by a data command. Implements RFC 821: MAIL <SP> FROM:<reverse-path> <CRLF>.

{} It's a method of the class: SMTP{}

No Hooks.


true|false. Nothing.


$SMTP = new SMTP();
$SMTP->mail( $from );
$from(string) (required)
Source address of this message

Code of SMTP::mail() WP 5.7.2

public function mail($from)
    $useVerp = ($this->do_verp ? ' XVERP' : '');

    return $this->sendCommand(
        'MAIL FROM',
        'MAIL FROM:<' . $from . '>' . $useVerp,