Skip to content

Commit

Permalink
mail replyto
Browse files Browse the repository at this point in the history
  • Loading branch information
Paweł Bukowski committed Oct 18, 2013
1 parent 41d5a45 commit d76d008
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
12 changes: 4 additions & 8 deletions modules/Base/Mail/MailCommon_0.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,18 +66,14 @@ public static function send($to,$subject,$body,$from_addr=null, $from_name=null,
if(!isset($from_addr)) {
$from_addr = Variable::get('mail_from_addr');
if($mail_use_replyto)
$mailer->AddReplyTo($from_addr, $from_name);
else
$mailer->SetFrom($from_addr, $from_name);
$mailer->AddReplyTo($mail_use_replyto, $from_name);
$mailer->SetFrom($from_addr, $from_name);
} else {
$mailer->AddReplyTo($from_addr, $from_name);
if(!$mail_use_replyto) {
$from_addr = Variable::get('mail_from_addr');
$mailer->SetFrom($from_addr);
}
$from_addr = Variable::get('mail_from_addr');
$mailer->SetFrom($from_addr);
}

$mailer->AddReplyTo($from_addr, $from_name);
if(Variable::get('mail_method') == 'smtp') {
$mailer->IsSMTP();
$h = explode(':', Variable::get('mail_host'));
Expand Down
2 changes: 1 addition & 1 deletion modules/Base/Mail/MailInstall.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function install() {
$ret = true;
if($ret) $ret = Variable::set('mail_from_addr','admin@example.com');
if($ret) $ret = Variable::set('mail_from_name','Administrator');
if($ret) $ret = Variable::set('mail_use_replyto',1);
if($ret) $ret = Variable::set('mail_use_replyto','');
if($ret) $ret = Variable::set('mail_method','mail');
if($ret) $ret = Variable::set('mail_user','');
if($ret) $ret = Variable::set('mail_password','');
Expand Down
2 changes: 1 addition & 1 deletion modules/Base/Mail/Mail_0.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function admin() {
$form->addRule('mail_from_addr', __('Field required'), 'required');

$form->addElement('text','mail_from_name', __('Send e-mails from name'));
$form->addElement('checkbox','mail_use_replyto', __('Use "Reply-To" header'));
$form->addElement('text','mail_use_replyto', __('Set "Reply-To" header'));

$method = $form->getElement('mail_method')->getSelected();
if($method[0]=='smtp') {
Expand Down

0 comments on commit d76d008

Please sign in to comment.