diff --git a/mod/dfrn_notify.php b/mod/dfrn_notify.php index 5f91f1b1be..040263b0ca 100644 --- a/mod/dfrn_notify.php +++ b/mod/dfrn_notify.php @@ -210,10 +210,23 @@ function dfrn_notify_post(&$a) { = html_entity_decode(bbcode(stripslashes(str_replace(array("\\r\\n", "\\r","\\n\\n" ,"\\n"), "
\n",$msg['body'])))); // load the template for private message notifications - $tpl = load_view_file('view/mail_received_eml.tpl'); + $tpl = load_view_file('view/mail_received_html_body_eml.tpl'); + $email_html_body_tpl = replace_macros($tpl,array( + '$siteName' => $a->config['sitename'], // name of this site + '$siteurl' => $a->get_baseurl(), // descriptive url of this site + '$thumb' => $importer['thumb'], // thumbnail url for sender icon + '$email' => $importer['email'], // email address to send to + '$url' => $importer['url'], // full url for the site + '$from' => $msg['from-name'], // name of the person sending the message + '$title' => stripslashes($msg['title']), // subject of the message + '$htmlversion' => $msg['htmlversion'], // html version of the message + '$mimeboundary' => $msg['mimeboundary'], // mime message divider + '$hostname' => $a->get_hostname() // name of this host + )); - // import the data into the template - $email_tpl = replace_macros($tpl, array( + // load the template for private message notifications + $tpl = load_view_file('view/mail_received_text_body_eml.tpl'); + $email_text_body_tpl = replace_macros($tpl,array( '$siteName' => $a->config['sitename'], // name of this site '$siteurl' => $a->get_baseurl(), // descriptive url of this site '$thumb' => $importer['thumb'], // thumbnail url for sender icon @@ -222,11 +235,24 @@ function dfrn_notify_post(&$a) { '$from' => $msg['from-name'], // name of the person sending the message '$title' => stripslashes($msg['title']), // subject of the message '$textversion' => $msg['textversion'], // text version of the message - '$htmlversion' => $msg['htmlversion'], // html version of the message '$mimeboundary' => $msg['mimeboundary'], // mime message divider '$hostname' => $a->get_hostname() // name of this host )); + // load the template for private message notifications + $tpl = load_view_file('view/mail_received_eml.tpl'); + + // import the data into the template + $email_tpl = replace_macros($tpl, array( + '$email' => $importer['email'], // email address to send to + '$from' => $msg['from-name'], // name of the person sending the message + '$title' => stripslashes($msg['title']), // subject of the message + '$mimeboundary' => $msg['mimeboundary'], // mime message divider + '$hostname' => $a->get_hostname(), // name of this host + '$htmlbody' => chunk_split(base64_encode($email_html_body_tpl)), + '$textbody' => chunk_split(base64_encode($email_text_body_tpl)) + )); + logger("message headers: " . $msg['headers']); logger("message body: " . $mail_tpl); diff --git a/view/de/mail_received_eml.tpl b/view/de/mail_received_eml.tpl index bf9bb9ca92..6ddd586fc7 100644 --- a/view/de/mail_received_eml.tpl +++ b/view/de/mail_received_eml.tpl @@ -1,47 +1,13 @@ --$mimeboundary -Content-Type: text/plain; charset=utf-8 -Content-Transfer-Encoding: 8bit +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: base64 -Du hast eine neue private Nachricht von '$from' auf '$siteName' erhhalten. - -$title - -$textversion - -Bitte melde dich unter $siteurl an um deine privaten Nachrichte zu lesen und zu -beantworten. - -Viele Grüße, -$siteName Administrator +$textbody --$mimeboundary -Content-Type: text/html; charset=utf-8 -Content-Transfer-Encoding: 8bit +Content-Type: text/html; charset=UTF-8 +Content-Transfer-Encoding: base64 + +$htmlbody - - - - Friendika Nachricht - - - - - - - - - - - - - - - - - - -
Friendika
Du hast eine neue private Nachricht von '$from' auf '$siteName' erhhalten.
$from
$title
$htmlversion
Bitte melde dich unter $siteurl an um deine privaten Nachrichte zu lesen und zu beantworten.
Viele Grüße,
$siteName Administrator
- - - --$mimeboundary-- \ No newline at end of file diff --git a/view/de/mail_received_html_body_eml.tpl b/view/de/mail_received_html_body_eml.tpl new file mode 100644 index 0000000000..b2d914f248 --- /dev/null +++ b/view/de/mail_received_html_body_eml.tpl @@ -0,0 +1,25 @@ + + + + Friendika Nachricht + + + + + + + + + + + + + + + + + + +
Friendika
Du hast eine neue private Nachricht von '$from' auf '$siteName' erhhalten.
$from
$title
$htmlversion
Bitte melde dich unter $siteurl an um deine privaten Nachrichte zu lesen und zu beantworten.
Viele Grüße,
$siteName Administrator
+ + diff --git a/view/de/mail_received_text_body_eml.tpl b/view/de/mail_received_text_body_eml.tpl new file mode 100644 index 0000000000..f5c90cfed2 --- /dev/null +++ b/view/de/mail_received_text_body_eml.tpl @@ -0,0 +1,11 @@ +Du hast eine neue private Nachricht von '$from' auf '$siteName' erhhalten. + +$title + +$textversion + +Bitte melde dich unter $siteurl an um deine privaten Nachrichte zu lesen und zu +beantworten. + +Viele Gr٤e, +$siteName Administrator diff --git a/view/en/mail_received_eml.tpl b/view/en/mail_received_eml.tpl index 8022800527..99eb14391c 100644 --- a/view/en/mail_received_eml.tpl +++ b/view/en/mail_received_eml.tpl @@ -1,47 +1,14 @@ --$mimeboundary -Content-Type: text/plain; charset=utf-8 -Content-Transfer-Encoding: 8bit +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: base64 -$from sent you a new private message at $siteName. - -$title - -$textversion - -Please login at $siteurl to read and reply to your private messages. - -Thank you, -$siteName administrator +$textbody --$mimeboundary -Content-Type: text/html; charset=utf-8 -Content-Transfer-Encoding: 8bit +Content-Type: text/html; charset=UTF-8 +Content-Transfer-Encoding: base64 + +$htmlbody - - - - Friendika Message - - - - - - - - - - - - - - - - - - -
Friendika
$from sent you a new private message at $siteName.
$from
$title
$htmlversion
Please login at $siteurl to read and reply to your private messages.
Thank You,
$siteName Administrator
- - - --$mimeboundary-- diff --git a/view/en/mail_received_html_body_eml.tpl b/view/en/mail_received_html_body_eml.tpl new file mode 100644 index 0000000000..981aa46e75 --- /dev/null +++ b/view/en/mail_received_html_body_eml.tpl @@ -0,0 +1,25 @@ + + + + Friendika Message + + + + + + + + + + + + + + + + + + +
Friendika
$from sent you a new private message at $siteName.
$from
$title
$htmlversion
Please login at $siteurl to read and reply to your private messages.
Thank You,
$siteName Administrator
+ + \ No newline at end of file diff --git a/view/en/mail_received_text_body_eml.tpl b/view/en/mail_received_text_body_eml.tpl new file mode 100644 index 0000000000..0238673043 --- /dev/null +++ b/view/en/mail_received_text_body_eml.tpl @@ -0,0 +1,10 @@ +$from sent you a new private message at $siteName. + +$title + +$textversion + +Please login at $siteurl to read and reply to your private messages. + +Thank you, +$siteName administrator diff --git a/view/fr/mail_received_eml.tpl b/view/fr/mail_received_eml.tpl index f872a67136..6ddd586fc7 100644 --- a/view/fr/mail_received_eml.tpl +++ b/view/fr/mail_received_eml.tpl @@ -1,46 +1,13 @@ --$mimeboundary -Content-Type: text/plain; charset=utf-8 -Content-Transfer-Encoding: 8bit +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: base64 -$from t'a envoyŽ un message ˆ $siteName. - -$title - -$textversion - -Ouvrez une session svp ˆ $siteurl pour lire et rŽpondre ˆ vos messages privŽs. - -Merci, -$siteName Administrateur +$textbody --$mimeboundary -Content-Type: text/html; charset=utf-8 -Content-Transfer-Encoding: 8bit +Content-Type: text/html; charset=UTF-8 +Content-Transfer-Encoding: base64 + +$htmlbody - - - - Friendika Message - - - - - - - - - - - - - - - - - - -
Friendika
$from t'a envoyŽ un message ˆ $siteName.
$from
$title
$htmlversion
Ouvrez une session svp ˆ $siteurl pour lire et rŽpondre ˆ vos messages privŽs.
Merci,
$siteName Administrateur
- - - --$mimeboundary-- \ No newline at end of file diff --git a/view/fr/mail_received_html_body_eml.tpl b/view/fr/mail_received_html_body_eml.tpl new file mode 100644 index 0000000000..43584a4c4f --- /dev/null +++ b/view/fr/mail_received_html_body_eml.tpl @@ -0,0 +1,25 @@ + + + + Friendika Message + + + + + + + + + + + + + + + + + + +
Friendika
$from t'a envoyŽ un message ˆ $siteName.
$from
$title
$htmlversion
Ouvrez une session svp ˆ $siteurl pour lire et rŽpondre ˆ vos messages privŽs.
Merci,
$siteName Administrateur
+ + diff --git a/view/fr/mail_received_text_body_eml.tpl b/view/fr/mail_received_text_body_eml.tpl new file mode 100644 index 0000000000..c877344e0e --- /dev/null +++ b/view/fr/mail_received_text_body_eml.tpl @@ -0,0 +1,10 @@ +$from t'a envoyŽ un message ˆ $siteName. + +$title + +$textversion + +Ouvrez une session svp ˆ $siteurl pour lire et rŽpondre ˆ vos messages privŽs. + +Merci, +$siteName Administrateur diff --git a/view/it/mail_received_eml.tpl b/view/it/mail_received_eml.tpl index 829c0fee59..538d28e1ec 100644 --- a/view/it/mail_received_eml.tpl +++ b/view/it/mail_received_eml.tpl @@ -1,46 +1,13 @@ --$mimeboundary -Content-Type: text/plain; charset=utf-8 -Content-Transfer-Encoding: 8bit +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: base64 -Hai ricevuto un nuovo messsaggio privato su $siteName da '$from'. - -$title - -$textversion - -Accedi a $siteurl per leggere e rispondere ai tuoi messaggi privati. - -Grazie, -L'amministratore di $siteName +$textbody --$mimeboundary -Content-Type: text/html; charset=utf-8 -Content-Transfer-Encoding: 8bit +Content-Type: text/html; charset=UTF-8 +Content-Transfer-Encoding: base64 + +$htmlbody - - - - Friendika Messsaggio - - - - - - - - - - - - - - - - - - -
Friendika
Hai ricevuto un nuovo messsaggio privato su $siteName da '$from'.
$from
$title
$htmlversion
Accedi a $siteurl per leggere e rispondere ai tuoi messaggi privati.
Grazie,
L'amministratore di $siteName
- - - ---$mimeboundary-- \ No newline at end of file +--$mimeboundary-- diff --git a/view/it/mail_received_html_body_eml.tpl b/view/it/mail_received_html_body_eml.tpl new file mode 100644 index 0000000000..a3c71cef9e --- /dev/null +++ b/view/it/mail_received_html_body_eml.tpl @@ -0,0 +1,25 @@ + + + + Friendika Messsaggio + + + + + + + + + + + + + + + + + + +
Friendika
Hai ricevuto un nuovo messsaggio privato su $siteName da '$from'.
$from
$title
$htmlversion
Accedi a $siteurl per leggere e rispondere ai tuoi messaggi privati.
Grazie,
L'amministratore di $siteName
+ + diff --git a/view/it/mail_received_text_body_eml.tpl b/view/it/mail_received_text_body_eml.tpl new file mode 100644 index 0000000000..c7da9533f1 --- /dev/null +++ b/view/it/mail_received_text_body_eml.tpl @@ -0,0 +1,10 @@ +Hai ricevuto un nuovo messsaggio privato su $siteName da '$from'. + +$title + +$textversion + +Accedi a $siteurl per leggere e rispondere ai tuoi messaggi privati. + +Grazie, +L'amministratore di $siteName