]> git.mxchange.org Git - friendica.git/commitdiff
set utf-8 on all emails
authorFriendika <info@friendika.com>
Fri, 15 Apr 2011 00:13:13 +0000 (17:13 -0700)
committerFriendika <info@friendika.com>
Fri, 15 Apr 2011 00:13:13 +0000 (17:13 -0700)
include/items.php
mod/dfrn_confirm.php
mod/dfrn_notify.php
mod/dfrn_request.php
mod/invite.php
mod/item.php
mod/lostpass.php
mod/register.php
mod/regmod.php

index 82752e168809087f33e867a735f44317260d7972..733cd8048410911943cc79d867b3c306e85695ac 100644 (file)
@@ -1415,7 +1415,9 @@ function new_follower($importer,$contact,$datarray,$item) {
                                $res = mail($r[0]['email'], 
                                        t("You have a new follower at ") . $a->config['sitename'],
                                        $email,
-                                       'From: ' . t('Administrator') . '@' . $_SERVER['SERVER_NAME'] );
+                                       'From: ' . t('Administrator') . '@' . $_SERVER['SERVER_NAME'] . "\n"
+                                       . 'Content-type: text/plain; charset=UTF-8' . "\n"
+                                       . 'Content-transfer-encoding: 8bit' );
                        
                        }
                }
index 02437ec36517919948f2a77d213f27a956a79f20..58473146d19c37b197f0f69e6cde0617d8ffdc92 100644 (file)
@@ -651,7 +651,11 @@ function dfrn_confirm_post(&$a,$handsfree = null) {
                        );
        
                        $res = mail($r[0]['email'], sprintf( t("Connection accepted at %s") , $a->config['sitename']),
-                               $email_tpl, 'From: ' . t('Administrator') . '@' . $_SERVER['SERVER_NAME'] );
+                               $email_tpl,
+                               'From: ' . t('Administrator') . '@' . $_SERVER['SERVER_NAME'] . "\n"
+                               . 'Content-type: text/plain; charset=UTF-8' . "\n"
+                               . 'Content-transfer-encoding: 8bit' );
+
                        if(!$res) {
                                // pointless throwing an error here and confusing the person at the other end of the wire.
                        }
index f6f68d348c4e53e82c863aa180a1cd1f8743e3ee..eb9d71fe3f3cb5d5093f6e1c7c08a488e6bf70b0 100644 (file)
@@ -401,7 +401,11 @@ function dfrn_notify_post(&$a) {
                                                        ));
        
                                                        $res = mail($importer['email'], sprintf(t('%s commented on an item at %s'), $from , $a->config['sitename']),
-                                                               $email_tpl, "From: " . t('Administrator') . '@' . $a->get_hostname() );
+                                                               $email_tpl, 
+                                                               'From: ' . t('Administrator') . '@' . $_SERVER['SERVER_NAME'] . "\n"
+                                                               . 'Content-type: text/plain; charset=UTF-8' . "\n"
+                                                               . 'Content-transfer-encoding: 8bit' );
+
                                                }
                                        }
                                        xml_status(0);
@@ -487,7 +491,11 @@ function dfrn_notify_post(&$a) {
                                                        ));
 
                                                        $res = mail($importer['email'], sprintf( t("%s commented on an item at %s") , $from ,$a->config['sitename']),
-                                                               $email_tpl, "From: ".t("Administrator") . "@". $a->get_hostname() );
+                                                               $email_tpl, 
+                                                               'From: ' . t('Administrator') . '@' . $_SERVER['SERVER_NAME'] . "\n"
+                                                               . 'Content-type: text/plain; charset=UTF-8' . "\n"
+                                                               . 'Content-transfer-encoding: 8bit' );
+
                                                        break;
                                                }
                                        }
index 11b7438a780f42674036509de1cdd468c6881d97..3c1c216fef5280af28d8b9dffa1ccffad071e916 100644 (file)
@@ -544,7 +544,10 @@ function dfrn_request_content(&$a) {
                                        $res = mail($r[0]['email'], 
                                            t("Introduction received at ") . $a->config['sitename'],
                                                $email,
-                                               'From: ' . t('Administrator') . '@' . $_SERVER['SERVER_NAME'] );
+                                               'From: ' . t('Administrator') . '@' . $_SERVER['SERVER_NAME'] . "\n"
+                                               . 'Content-type: text/plain; charset=UTF-8' . "\n"
+                                               . 'Content-transfer-encoding: 8bit' );
+
                                        // This is a redundant notification - no point throwing errors if it fails.
                                }
                                if($auto_confirm) {
index 84fa978ad1aafb397e82e55296256fd94d000202..1c511959574820d0a4646ec8ccea2a3538306559 100644 (file)
@@ -30,7 +30,11 @@ function invite_post(&$a) {
                }
 
                $res = mail($recip, sprintf(t('Please join my network on %s'), $a->config['sitename']), 
-                       $message, "From: " . $a->user['email']);
+                       $message, 
+                       "From: " . $a->user['email'] . "\n"
+                       . 'Content-type: text/plain; charset=UTF-8' . "\n"
+                       . 'Content-transfer-encoding: 8bit' );
+
                if($res) {
                        $total ++;
                }
index 5cefb3be3e61bdf22a2691be3b41fe8c7a82c0eb..26afec2f4467807b9f38bce498ce40882d574b73 100644 (file)
@@ -472,7 +472,10 @@ function item_post(&$a) {
                                ));
 
                                $res = mail($user['email'], sprintf( t("%s commented on your item at %s") ,$from,$a->config['sitename']),
-                                       $email_tpl,"From: " . t("Administrator") . "@" . $a->get_hostname() );
+                                       $email_tpl,
+                                       'From: ' . t('Administrator') . '@' . $_SERVER['SERVER_NAME'] . "\n"
+                                       . 'Content-type: text/plain; charset=UTF-8' . "\n"
+                                       . 'Content-transfer-encoding: 8bit' );
                        }
                }
                else {
@@ -495,7 +498,11 @@ function item_post(&$a) {
                                ));
 
                                $res = mail($user['email'], sprintf( t("%s posted on your profile wall at %s") ,$from, $a->config['sitename']),
-                                       $email_tpl,"From: " . t("Administrator") . "@" . $a->get_hostname() );
+                                       $email_tpl,
+                                       'From: ' . t('Administrator') . '@' . $_SERVER['SERVER_NAME'] . "\n"
+                                       . 'Content-type: text/plain; charset=UTF-8' . "\n"
+                                       . 'Content-transfer-encoding: 8bit' );
+
                        }
                }
 
index c46a57e6a2bfb7846ef3cac474bc11c888d036a5..8d1cf7629db26155d824d997d0b6ee004bf65047 100644 (file)
@@ -36,7 +36,11 @@ function lostpass_post(&$a) {
        ));
 
        $res = mail($email, sprintf( t('Password reset requested at %s'),$a->config['sitename']),
-                       $email_tpl, 'From: ' . t('Administrator') . '@' . $_SERVER[SERVER_NAME]);
+                       $email_tpl,
+                       'From: ' . t('Administrator') . '@' . $_SERVER['SERVER_NAME'] . "\n"
+                       . 'Content-type: text/plain; charset=UTF-8' . "\n"
+                       . 'Content-transfer-encoding: 8bit' );
+
 
        goaway($a->get_baseurl());
 }
@@ -94,7 +98,10 @@ function lostpass_content(&$a) {
                        '$new_password' => $new_password,
                        '$uid' => $newuid ));
 
-                       $res = mail($email,"Your password has changed at {$a->config['sitename']}",$email_tpl,"From: Administrator@{$_SERVER[SERVER_NAME]}");
+                       $res = mail($email,"Your password has changed at {$a->config['sitename']}",$email_tpl,
+                               'From: ' . t('Administrator') . '@' . $_SERVER['SERVER_NAME'] . "\n"
+                               . 'Content-type: text/plain; charset=UTF-8' . "\n"
+                               . 'Content-transfer-encoding: 8bit' );
 
                        return $o;
                }
index 5fe7c0c6dd2d310e660e3c83fdd37d2ccedfa86a..83e9e289106e98255d34aea773f6847728cdbf12 100644 (file)
@@ -329,7 +329,10 @@ function register_post(&$a) {
                                '$uid' => $newuid ));
 
                $res = mail($email, sprintf(t('Registration details for %s'), $a->config['sitename']),
-                       $email_tpl, 'From: ' . t('Administrator') . '@' . $_SERVER['SERVER_NAME']);
+                       $email_tpl, 
+                               'From: ' . t('Administrator') . '@' . $_SERVER['SERVER_NAME'] . "\n"
+                               . 'Content-type: text/plain; charset=UTF-8' . "\n"
+                               . 'Content-transfer-encoding: 8bit' );
 
 
                if($res) {
@@ -366,8 +369,10 @@ function register_post(&$a) {
                 ));
 
                $res = mail($a->config['admin_email'], sprintf(t('Registration request at %s'), $a->config['sitename']),
-                       $email_tpl,'From: ' .  t('Administrator') . '@' . $_SERVER['SERVER_NAME']);
-
+                       $email_tpl,
+                               'From: ' . t('Administrator') . '@' . $_SERVER['SERVER_NAME'] . "\n"
+                               . 'Content-type: text/plain; charset=UTF-8' . "\n"
+                               . 'Content-transfer-encoding: 8bit' );
                if($res) {
                        notice( t('Your registration is pending approval by the site owner.') . EOL ) ;
                        goaway($a->get_baseurl());
index 2cbe810bc94c4e62c3a8e8cbf5ebfc9d9131735d..b985ee3644e69600d960a98cfe8f73be19109c88 100644 (file)
@@ -90,7 +90,10 @@ function regmod_content(&$a) {
                ));
 
                $res = mail($user[0]['email'], sprintf(t('Registration details for %s'), $a->config['sitename']),
-                       $email_tpl,'From: ' . t('Administrator') . '@' . $_SERVER['SERVER_NAME'] );
+                       $email_tpl,
+                               'From: ' . t('Administrator') . '@' . $_SERVER['SERVER_NAME'] . "\n"
+                               . 'Content-type: text/plain; charset=UTF-8' . "\n"
+                               . 'Content-transfer-encoding: 8bit' );
 
                if($res) {
                        notice( t('Account approved.') . EOL );