send mail to applicant frommail fetch from email_recruiter|recruiter(user) email|constants
This commit is contained in:
parent
91ef9bcbed
commit
fcb4e0288a
@ -146,6 +146,11 @@ if ($action == 'presend') {
|
|||||||
$formmail->fromname = (!empty($conf->global->ORDER_SUPPLIER_EMAIL_SENDER_NAME) ? $conf->global->ORDER_SUPPLIER_EMAIL_SENDER_NAME : '');
|
$formmail->fromname = (!empty($conf->global->ORDER_SUPPLIER_EMAIL_SENDER_NAME) ? $conf->global->ORDER_SUPPLIER_EMAIL_SENDER_NAME : '');
|
||||||
$formmail->fromtype = 'special';
|
$formmail->fromtype = 'special';
|
||||||
}
|
}
|
||||||
|
if ($object->element === 'recruitmentcandidature' ) {
|
||||||
|
$formmail->frommail = (!empty($conf->global->RECRUITMENT_EMAIL_SENDER) ? $conf->global->RECRUITMENT_EMAIL_SENDER : $recruitermail);
|
||||||
|
$formmail->fromname = (!empty($conf->global->RECRUITMENT_EMAIL_SENDER_NAME) ? $conf->global->RECRUITMENT_EMAIL_SENDER_NAME : (!empty($recruitername) ? $recruitername : ''));
|
||||||
|
$formmail->fromtype = 'special';
|
||||||
|
}
|
||||||
|
|
||||||
$formmail->trackid = empty($trackid) ? '' : $trackid;
|
$formmail->trackid = empty($trackid) ? '' : $trackid;
|
||||||
$formmail->inreplyto = empty($inreplyto) ? '' : $inreplyto;
|
$formmail->inreplyto = empty($inreplyto) ? '' : $inreplyto;
|
||||||
|
|||||||
@ -651,6 +651,16 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
$trackid = 'recruitmentcandidature'.$object->id;
|
$trackid = 'recruitmentcandidature'.$object->id;
|
||||||
$inreplyto = $object->email_msgid;
|
$inreplyto = $object->email_msgid;
|
||||||
|
|
||||||
|
$job = new RecruitmentJobPosition($db);
|
||||||
|
$job->fetch($object->fk_recruitmentjobposition);
|
||||||
|
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
|
||||||
|
$recruiter = new User($db);
|
||||||
|
$recruiter->fetch($job->fk_user_recruiter);
|
||||||
|
|
||||||
|
$recruitername = $recruiter->getFullName('');
|
||||||
|
$recruitermail = (!empty($job->email_recruiter) ? $job->email_recruiter : $recruiter->email);
|
||||||
|
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user