mail template working, but info in it not replaced by values
This commit is contained in:
parent
4c57a6c207
commit
790ff0c64c
@ -364,9 +364,8 @@ if (empty($reshook) && $action == 'add') {
|
|||||||
$arraydefaultmessage = null;
|
$arraydefaultmessage = null;
|
||||||
|
|
||||||
$labeltouse = $conf->global->EVENTORGANIZATION_TEMPLATE_EMAIL_AFT_SUBS_EVENT;
|
$labeltouse = $conf->global->EVENTORGANIZATION_TEMPLATE_EMAIL_AFT_SUBS_EVENT;
|
||||||
|
|
||||||
if (!empty($labeltouse)) {
|
if (!empty($labeltouse)) {
|
||||||
$arraydefaultmessage = $formmail->getEMailTemplate($db, 'member', $user, $outputlangs, 0, 1, $labeltouse);
|
$arraydefaultmessage = $formmail->getEMailTemplate($db, 'eventorganization_send', $user, $outputlangs, $labeltouse, 1, '');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($labeltouse) && is_object($arraydefaultmessage) && $arraydefaultmessage->id > 0) {
|
if (!empty($labeltouse) && is_object($arraydefaultmessage) && $arraydefaultmessage->id > 0) {
|
||||||
@ -377,16 +376,15 @@ if (empty($reshook) && $action == 'add') {
|
|||||||
$substitutionarray = getCommonSubstitutionArray($outputlangs, 0, null, $object);
|
$substitutionarray = getCommonSubstitutionArray($outputlangs, 0, null, $object);
|
||||||
complete_substitutions_array($substitutionarray, $outputlangs, $object);
|
complete_substitutions_array($substitutionarray, $outputlangs, $object);
|
||||||
$subjecttosend = make_substitutions($subject, $substitutionarray, $outputlangs);
|
$subjecttosend = make_substitutions($subject, $substitutionarray, $outputlangs);
|
||||||
$texttosend = $msg;
|
$texttosend = make_substitutions($msg, $substitutionarray, $outputlangs);
|
||||||
|
|
||||||
$sendto = $thirdparty->email;
|
$sendto = $thirdparty->email;
|
||||||
$from = $conf->global->MAILING_EMAIL_FROM;
|
$from = $conf->global->MAILING_EMAIL_FROM;
|
||||||
$urlback = $_SERVER["REQUEST_URI"];
|
$urlback = $_SERVER["REQUEST_URI"];
|
||||||
$topic = $langs->trans("ConfAttendeeSubscriptionConfirmation");
|
|
||||||
|
|
||||||
$ishtml = dol_textishtml($texttosend); // May contain urls
|
$ishtml = dol_textishtml($texttosend); // May contain urls
|
||||||
|
|
||||||
$mailfile = new CMailFile($topic, $sendto, $from, $texttosend, array(), array(), array(), '', '', 0, $ishtml);
|
$mailfile = new CMailFile($subjecttosend, $sendto, $from, $texttosend, array(), array(), array(), '', '', 0, $ishtml);
|
||||||
|
|
||||||
$result = $mailfile->sendfile();
|
$result = $mailfile->sendfile();
|
||||||
var_dump($result);
|
var_dump($result);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user