SMTP :: boolean send ( resource connection, array addresses, string message [, string from ] )
Return TRUE if the message has been successfully sent, FALSE if not. array addresses and string from format is "localpart@domainpart.tld". string message format must be in conformity with the RFC2822. The SMTP command "RCPT TO" is sent for each mail address from array addresses. The SMTP command "MAIL FROM" is sent for string from mail address. Example:

// standard mail message RFC2822
$m = 'From: me@myaddress.tld'."\n".
     'To: client@destination.tld'."\n".
     'Subject: Hello World!'."\n".
     'Content-Type: text/plain'."\n\n".
     'Text message.';

// connect to 'destination.tld' MX zone
$c = SMTP::MXconnect('destination.tld') or die(print_r($_RESULT));

// send mail
$s = SMTP::Send($c, array('client@destination.tld'), $m, 'me@myaddress.tld');

// print result
if ($s) echo 'Sent !';
else print_r($_RESULT);

See Also: SMTP::Connect(), SMTP::MXconnect() [ Comments ] Last update: Sunday, June 24, 2007