sforkowany z mirror/friendica
mail: "reply-to" now triggers the "sender"-header instead of the "reply-to"-header.
rodzic
fc816feb6d
commit
9ab34f8857
|
@ -458,13 +458,17 @@ function delivery_run(&$argv, &$argc){
|
|||
|
||||
// only expose our real email address to true friends
|
||||
|
||||
if(($contact['rel'] == CONTACT_IS_FRIEND) && (! $contact['blocked']))
|
||||
$headers = 'From: ' . email_header_encode($local_user[0]['username'],'UTF-8') . ' <' . $local_user[0]['email'] . '>' . "\n";
|
||||
else
|
||||
if(($contact['rel'] == CONTACT_IS_FRIEND) && (! $contact['blocked'])) {
|
||||
if($reply_to) {
|
||||
$headers = 'From: '.email_header_encode($local_user[0]['username'],'UTF-8').' <'.$reply_to.'>'."\n";
|
||||
$headers .= 'Sender: '.$local_user[0]['email']."\n";
|
||||
} else
|
||||
$headers = 'From: '.email_header_encode($local_user[0]['username'],'UTF-8').' <'.$local_user[0]['email'].'>'."\n";
|
||||
} else
|
||||
$headers = 'From: ' . email_header_encode($local_user[0]['username'],'UTF-8') . ' <' . t('noreply') . '@' . $a->get_hostname() . '>' . "\n";
|
||||
|
||||
if($reply_to)
|
||||
$headers .= 'Reply-to: ' . $reply_to . "\n";
|
||||
//if($reply_to)
|
||||
// $headers .= 'Reply-to: ' . $reply_to . "\n";
|
||||
|
||||
// for testing purposes: Collect exported mails
|
||||
// $file = tempnam("/tmp/friendica/", "mail-out-");
|
||||
|
|
|
@ -771,14 +771,17 @@ function notifier_run(&$argv, &$argc){
|
|||
$subject = (($it['title']) ? email_header_encode($it['title'],'UTF-8') : t("\x28no subject\x29")) ;
|
||||
|
||||
// only expose our real email address to true friends
|
||||
|
||||
if(($contact['rel'] == CONTACT_IS_FRIEND) && (! $contact['blocked']))
|
||||
$headers = 'From: ' . email_header_encode($local_user[0]['username'],'UTF-8') . ' <' . $local_user[0]['email'] . '>' . "\n";
|
||||
if($reply_to) {
|
||||
$headers = 'From: ' . email_header_encode($local_user[0]['username'],'UTF-8') . ' <' . $reply_to . '>' . "\n";
|
||||
$headers .= 'Sender: '.$local_user[0]['email']."\n";
|
||||
} else
|
||||
$headers = 'From: ' . email_header_encode($local_user[0]['username'],'UTF-8') . ' <' . $local_user[0]['email'] . '>' . "\n";
|
||||
else
|
||||
$headers = 'From: ' . email_header_encode($local_user[0]['username'],'UTF-8') . ' <' . t('noreply') . '@' . $a->get_hostname() . '>' . "\n";
|
||||
|
||||
if($reply_to)
|
||||
$headers .= 'Reply-to: ' . $reply_to . "\n";
|
||||
//if($reply_to)
|
||||
// $headers .= 'Reply-to: ' . $reply_to . "\n";
|
||||
|
||||
// for testing purposes: Collect exported mails
|
||||
//$file = tempnam("/tmp/friendica/", "mail-out2-");
|
||||
|
|
|
@ -209,6 +209,7 @@ function settings_post(&$a) {
|
|||
intval($mail_pubmail),
|
||||
intval(local_user())
|
||||
);
|
||||
logger("mail: updating mailaccount. Response: ".print_r($r, true));
|
||||
$r = q("SELECT * FROM `mailacct` WHERE `uid` = %d LIMIT 1",
|
||||
intval(local_user())
|
||||
);
|
||||
|
@ -731,7 +732,7 @@ function settings_content(&$a) {
|
|||
'$mail_ssl' => array('mail_ssl', t('Security:'), strtoupper($mail_ssl), '', array( 'notls'=>t('None'), 'TLS'=>'TLS', 'SSL'=>'SSL')),
|
||||
'$mail_user' => array('mail_user', t('Email login name:'), $mail_user, ''),
|
||||
'$mail_pass' => array('mail_pass', t('Email password:'), '', ''),
|
||||
'$mail_replyto' => array('mail_replyto', t('Reply-to address:'), '', 'Optional'),
|
||||
'$mail_replyto' => array('mail_replyto', t('Reply-to address:'), $mail_replyto, 'Optional'),
|
||||
'$mail_pubmail' => array('mail_pubmail', t('Send public posts to all email contacts:'), $mail_pubmail, ''),
|
||||
'$mail_action' => array('mail_action', t('Action after import:'), $mail_action, '', array(0=>t('None'), /*1=>t('Delete'),*/ 2=>t('Mark as seen'), 3=>t('Move to folder'))),
|
||||
'$mail_movetofolder' => array('mail_movetofolder', t('Move to folder:'), $mail_movetofolder, ''),
|
||||
|
|
Ładowanie…
Reference in New Issue