Order Supplier Email Sender Extension

Extended the advanced options to specify an email address for the order supplier. Useful if you operate under a brand, but order under a different.
This commit is contained in:
netdrag 2021-07-22 18:38:22 +02:00 committed by GitHub
parent afa6ced6c9
commit 6cfd8c6f24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -137,7 +137,14 @@ if ($action == 'presend') {
$formmail->fromname = '';
$formmail->fromtype = 'special';
}
if ($object->element === 'order_supplier' && !empty($conf->global->ORDER_SUPPLIER_EMAIL_SENDER)) {
$formmail->frommail = $conf->global->ORDER_SUPPLIER_EMAIL_SENDER;
$formmail->fromname = '';
$formmail->fromtype = 'special';
}
$formmail->trackid = $trackid;
if (!empty($conf->global->MAIN_EMAIL_ADD_TRACK_ID) && ($conf->global->MAIN_EMAIL_ADD_TRACK_ID & 2)) { // If bit 2 is set
include DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';