'$error' => sprintf( t('Update %s failed. See error logs.'), $x)
));
$subject=sprintf(t('Update Error at %s'), $a->get_baseurl());
-
+ require_once('include/email.php');
+ $subject = email_header_encode($subject,'UTF-8');
mail($a->config['admin_email'], $subject, $email_msg,
- 'From: ' . t('Administrator') . '@' . $_SERVER['SERVER_NAME'] . "\n"
+ 'From: ' . 'Administrator' . '@' . $_SERVER['SERVER_NAME'] . "\n"
. 'Content-type: text/plain; charset=UTF-8' . "\n"
. 'Content-transfer-encoding: 8bit' );
//try the logger
require_once('include/salmon.php');
require_once('include/crypto.php');
require_once('include/Photo.php');
-
+require_once('include/email.php');
function get_feed_for(&$a, $dfrn_id, $owner_nick, $last_update, $direction = 0) {
'$sitename' => $a->config['sitename']
));
$res = mail($r[0]['email'],
- (($sharing) ? t('A new person is sharing with you at ') : t("You have a new follower at ")) . $a->config['sitename'],
+ email_header_encode((($sharing) ? t('A new person is sharing with you at ') : t("You have a new follower at ")) . $a->config['sitename'],'UTF-8'),
$email,
- 'From: ' . t('Administrator') . '@' . $_SERVER['SERVER_NAME'] . "\n"
+ 'From: ' . 'Administrator' . '@' . $_SERVER['SERVER_NAME'] . "\n"
. 'Content-type: text/plain; charset=UTF-8' . "\n"
. 'Content-transfer-encoding: 8bit' );
require_once('include/pgettext.php');
require_once('include/datetime.php');
+
function create_user($arr) {
// Required: { username, nickname, email } or { openid_url }
'$dfrn_url' => $r[0]['url'],
'$uid' => $newuid )
);
-
- $res = mail($r[0]['email'], sprintf( t("Connection accepted at %s") , $a->config['sitename']),
+ require_once('include/email.php');
+
+ $res = mail($r[0]['email'], email_header_encode( sprintf( t("Connection accepted at %s") , $a->config['sitename']),'UTF-8'),
$email_tpl,
- 'From: ' . t('Administrator') . '@' . $_SERVER['SERVER_NAME'] . "\n"
+ 'From: ' . 'Administrator' . '@' . $_SERVER['SERVER_NAME'] . "\n"
. 'Content-type: text/plain; charset=UTF-8' . "\n"
. 'Content-transfer-encoding: 8bit' );
*
*/
+require_once('include/email.php');
+
function invite_post(&$a) {
if(! local_user()) {
else
$nmessage = $message;
- $res = mail($recip, sprintf( t('Please join us on Friendica'), $a->config['sitename']),
+ $res = mail($recip, email_header_encode( t('Please join us on Friendica'),'UTF-8'),
$nmessage,
"From: " . $a->user['email'] . "\n"
. 'Content-type: text/plain; charset=UTF-8' . "\n"
<?php
+require_once('include/email.php');
function lostpass_post(&$a) {
'$reset_link' => $a->get_baseurl() . '/lostpass?verify=' . $new_password
));
- $res = mail($email, sprintf( t('Password reset requested at %s'),$a->config['sitename']),
+ $res = mail($email, email_header_encode(sprintf( t('Password reset requested at %s'),$a->config['sitename']),'UTF-8'),
$email_tpl,
- 'From: ' . t('Administrator') . '@' . $_SERVER['SERVER_NAME'] . "\n"
+ 'From: ' . 'Administrator' . '@' . $_SERVER['SERVER_NAME'] . "\n"
. 'Content-type: text/plain; charset=UTF-8' . "\n"
. 'Content-transfer-encoding: 8bit' );
'$new_password' => $new_password,
'$uid' => $newuid ));
- $res = mail($email,"Your password has changed at {$a->config['sitename']}",$email_tpl,
- 'From: ' . t('Administrator') . '@' . $_SERVER['SERVER_NAME'] . "\n"
+ $subject = sprintf( t('Your password has been changed at %s'), $a->config['sitename']);
+
+ $res = mail($email, email_header_encode( $subject, 'UTF-8'), $email_tpl,
+ 'From: ' . 'Administrator' . '@' . $_SERVER['SERVER_NAME'] . "\n"
. 'Content-type: text/plain; charset=UTF-8' . "\n"
. 'Content-transfer-encoding: 8bit' );
<?php
+require_once('include/email.php');
+
if(! function_exists('register_post')) {
function register_post(&$a) {
'$password' => $result['password'],
'$uid' => $user['uid'] ));
- $res = mail($user['email'], sprintf(t('Registration details for %s'), $a->config['sitename']),
+ $res = mail($user['email'], email_header_encode( sprintf( t('Registration details for %s'), $a->config['sitename']),'UTF-8'),
$email_tpl,
- 'From: ' . t('Administrator') . '@' . $_SERVER['SERVER_NAME'] . "\n"
+ 'From: ' . 'Administrator' . '@' . $_SERVER['SERVER_NAME'] . "\n"
. 'Content-type: text/plain; charset=UTF-8' . "\n"
. 'Content-transfer-encoding: 8bit' );
'$hash' => $hash
));
- $res = mail($a->config['admin_email'], sprintf(t('Registration request at %s'), $a->config['sitename']),
+ $res = mail($a->config['admin_email'], email_header_encode( sprintf(t('Registration request at %s'), $a->config['sitename']),'UTF-8'),
$email_tpl,
- 'From: ' . t('Administrator') . '@' . $_SERVER['SERVER_NAME'] . "\n"
+ 'From: ' . 'Administrator' . '@' . $_SERVER['SERVER_NAME'] . "\n"
. 'Content-type: text/plain; charset=UTF-8' . "\n"
. 'Content-transfer-encoding: 8bit' );
<?php
+require_once('include/email.php');
+
function user_allow($hash) {
$a = get_app();
'$uid' => $user[0]['uid']
));
- $res = mail($user[0]['email'], sprintf(t('Registration details for %s'), $a->config['sitename']),
+ $res = mail($user[0]['email'], email_header_encode( sprintf(t('Registration details for %s'), $a->config['sitename']), 'UTF-8'),
$email_tpl,
- 'From: ' . t('Administrator') . '@' . $_SERVER['SERVER_NAME'] . "\n"
+ 'From: ' . 'Administrator' . '@' . $_SERVER['SERVER_NAME'] . "\n"
. 'Content-type: text/plain; charset=UTF-8' . "\n"
. 'Content-transfer-encoding: 8bit' );