function SMTP::mail

5.x SMTP.php public SMTP::mail($from)

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>.

Parameters

string $from Source address of this message:

Return value

bool

File

inc/PHPMailer/src/SMTP.php, line 817

Class

SMTP
PHPMailer RFC821 SMTP email transport class. Implements RFC 821 SMTP commands and provides some utility methods for sending mail to an SMTP server.

Code

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

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