rfc2047 encode notification email headers
This commit is contained in:
parent
309df84172
commit
da05ef2ae4
2 changed files with 10 additions and 1 deletions
|
@ -1,4 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
require_once('include/email.php');
|
||||||
|
|
||||||
class EmailNotification {
|
class EmailNotification {
|
||||||
/**
|
/**
|
||||||
* Send a multipart/alternative message with Text and HTML versions
|
* Send a multipart/alternative message with Text and HTML versions
|
||||||
|
@ -12,6 +15,10 @@ class EmailNotification {
|
||||||
* @param textVersion text only version of the message
|
* @param textVersion text only version of the message
|
||||||
*/
|
*/
|
||||||
static public function sendTextHtmlEmail($fromName,$fromEmail,$replyTo,$toEmail,$messageSubject,$htmlVersion,$textVersion) {
|
static public function sendTextHtmlEmail($fromName,$fromEmail,$replyTo,$toEmail,$messageSubject,$htmlVersion,$textVersion) {
|
||||||
|
|
||||||
|
$fromName = email_header_encode($fromName,'UTF-8');
|
||||||
|
$messageSubject = email_header_encode($messageSubject,'UTF-8');
|
||||||
|
|
||||||
|
|
||||||
// generate a mime boundary
|
// generate a mime boundary
|
||||||
$mimeBoundary =rand(0,9)."-"
|
$mimeBoundary =rand(0,9)."-"
|
||||||
|
|
|
@ -205,4 +205,6 @@ function email_header_encode($in_str, $charset) {
|
||||||
$out_str = $start . $out_str . $end;
|
$out_str = $start . $out_str . $end;
|
||||||
}
|
}
|
||||||
return $out_str;
|
return $out_str;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue