예제 #1
0
파일: thp.php 프로젝트: CharlieDancey/THP
function _PHP_FUNC_htmlmail($obj)
{
    $from = _LISP_get_string($obj, 1, 1);
    $to = _LISP_get_string($obj, 2, 1);
    $subject = _LISP_get_string($obj, 3, 1);
    $plaintext = _LISP_get_string($obj, 4, 1);
    $html = _LISP_get_string($obj, 5, 1);
    htmlmail($from, $to, $subject, $plaintext, $html);
    return 'sym:t';
}
예제 #2
0
파일: forward.php 프로젝트: maduhu/rCredits
$s = <<<EOF
link: {$link}<br>
coding: {$coding}<br>
subject: {$subject}<br>
to: {$who}<br>
decoded: {$text}<br>
original: {$s}<br>
response: {$response}
EOF;
// response here is temporary?
//echo $s;
if (preg_match('/Your .* has been changed/i', $subject)) {
    $ok = @file_get_contents("https://new.credits.org/coup/{$who}");
    $subject = "WARNING!! ({$ok}) {$subject}";
}
htmlmail(STAFF_EMAIL, "rC4: {$subject} (to {$who})", $s);
/**
 * Return the subject, recipient, and subsequent text
 * @param string $msg: the email body
 * @return [ignorethis, who, subject, text]
 */
function parseHeader($msg)
{
    if (preg_match('~$\\s*To: (.*?)$.*Subject: (.*?)$(.*)~ms', $msg, $matches)) {
        return $matches;
    }
    if (preg_match('~$\\s*Subject: (.*?)$.*To: (.*?)$(.*)~ms', $msg, $matches)) {
        return array('', $matches[2], $matches[1], $matches[3]);
    }
    return array('', '', '', '');
}