コード例 #1
0
ファイル: old-mail.php プロジェクト: piter65/spilldec
function sendMail($from, $to, $subj, $msg, $hdrs)
{
    $smtpmail = new SMTPmail();
    $smtpmail->smtp_host = 'bobo.semilogic.com';
    $smtpmail->smtp_host = 'localhost';
    if (!$smtpmail->send($to, $from, $subj, $msg, $hdrs)) {
        fail("Could not send email to {$to}!");
    }
}
コード例 #2
0
ファイル: mail.php プロジェクト: piter65/spilldec
function sendMail($from, $to, $subj, $msg, $hdrs)
{
    $smtpmail = new SMTPmail();
    $smtpmail->smtp_host = 'bobo.semilogic.com';
    $msg = preg_replace("/\n/", "\r\n", $msg);
    $hdrs = preg_replace("/\n/", "\r\n", $hdrs);
    if (!$smtpmail->send($to, $from, $subj, $msg, $hdrs)) {
        echo "ERROR " . $smtpmail->ERROR_MSG . "Could not send email to {$to}!";
    }
}