CakeFest 2025 Madrid: The Official CakePHP Conference

Voting

: max(seven, four)?
(Example: nine)

The Note You're Voting On

mark [at] d0gz [dot] net
18 years ago
When using ssmtp for simple command line mailing:

$mail_to = "[email protected]";
$msg = "this would be an actual base64_encoded gzip msg";
$date = date(r);
$mail = "X-FROM: [email protected] \n";
$mail .= "X-TO: ".$mail_to. " \n";
$mail .= "To: ".$mail_to. " \n";
$mail .= "Date: $date \n";
$mail .= "From: [email protected] \n";
$mail .= "Subject: lifecheck \n";
$mail .= $msg." \n";
exec("echo '$mail' | /usr/sbin/ssmtp ".$mail_to);

be sure to invoke chunk_split() on your message body - ssmtp becomes unhappy with long lines and will subsequently trash your message.

<< Back to user notes page

To Top