Skip to content

Commit

Permalink
Allow to set ReplyTo header in e-mailings
Browse files Browse the repository at this point in the history
  • Loading branch information
ymollard committed Oct 18, 2024
1 parent 622a296 commit 62a42e4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion htdocs/comm/mailing/card.php
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@

$trackid = 'emailing-test';
$upload_dir_tmp = $upload_dir;
$mailfile = new CMailFile($tmpsujet, $object->sendto, $object->email_from, $tmpbody, $arr_file, $arr_mime, $arr_name, '', '', 0, $msgishtml, $object->email_errorsto, $arr_css, $trackid, '', 'emailing', '', $upload_dir_tmp);
$mailfile = new CMailFile($tmpsujet, $object->sendto, $object->email_from, $tmpbody, $arr_file, $arr_mime, $arr_name, '', '', 0, $msgishtml, $object->email_errorsto, $arr_css, $trackid, '', 'emailing', $object->email_replyto, $upload_dir_tmp);

$result = $mailfile->sendfile();
if ($result) {
Expand Down Expand Up @@ -833,6 +833,8 @@

print '<tr class="fieldsforemail"><td>'.$langs->trans("MailErrorsTo").'</td><td><input class="flat minwidth200" name="errorsto" value="'.getDolGlobalString('MAILING_EMAIL_ERRORSTO', getDolGlobalString('MAIN_MAIL_ERRORS_TO')).'"></td></tr>';

print '<tr class="fieldsforemail"><td>'.$langs->trans("MailReply").'</td><td><input class="flat minwidth200" name="replyto" value="'.getDolGlobalString('MAILING_EMAIL_REPLYTO', getDolGlobalString('MAIN_MAIL_REPLY_TO')).'"></td></tr>';

// Other attributes
$parameters = array();
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
Expand Down Expand Up @@ -1377,6 +1379,7 @@
// To
if ($object->messtype != 'sms') {
print '<tr><td>'.$langs->trans("MailErrorsTo").'</td><td>'.dol_print_email($object->email_errorsto, 0, 0, 0, 0, 1).'</td></tr>';
print '<tr><td>'.$langs->trans("MailReply").'</td><td>'.dol_print_email($object->email_replyto, 0, 0, 0, 0, 1).'</td></tr>';
}

print '</table>';
Expand Down

0 comments on commit 62a42e4

Please sign in to comment.