psMailSimple() Simple mail wrapper
Description:
Just a simple email function, uses propper email formating of names
Note: this is a wrapper for mail()
Usage:
psMailSimple($toEmail, $toName, $fromEmail, $fromName, $subject, $body);
Example:
psMailSimple("sumguy@aol.com", "Sum Guy", "admin@here.com", "The Admin", "Spam", "Stop Spamming us!");
Code:
function psMailSimple($toEmail, $toName, $fromEmail, $fromName, $subject, $body, $headers="") { $headers .= "From: $fromName <$fromEmail>\r\n" . "X-Mailer: psMailSimple (PHP Salt library function)\r\n"; ini_set('sendmail_from', $fromEmail); mail($toEmail, $subject, $body, $headers, "-f {$fromEmail}"); //mail command :) }
Changlelog:
|
|