Answer the question
In order to leave comments, you need to log in
Custom_mail bitrix?
Guys, instead of the standard Bitrix functionality for sending mail, I use my self-written function via smtp.
The function works, but is slightly wrong.
I have the Bitrix variable #MAIL_TO# instead of the address, instead of the address.
A function called custom_mail.
function custom_mail($to, $subject, $message, $addh = "", $addp = "")
{
// require_once __DIR__.'/phpmailer/class.phpmailer.php';
require_once __DIR__.'/phpmailer/PHPMailerAutoload.php';
/*
подключение убрал
*/
$to = explode(',', $to);
foreach ($to as $value) {
$Mailer->addAddress($value);
}
$Mailer->setFrom('[email protected]', 'info');
$Mailer->addReplyTo('[email protected]', 'Information');
$Mailer->addAddress($to);
$Mailer->Subject = $subject;
$Mailer->Body = $message;
$Mailer->IsHTML(true);
$status = $Mailer->Send();
}
Answer the question
In order to leave comments, you need to log in
And #MAIL_TO# is not accidentally contained in the incoming $to
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question