K
K
krispey1022021-07-27 11:38:17
1C-Bitrix
krispey102, 2021-07-27 11:38:17

Bitrix how to add an attachment to a letter template to the standard form of Bitrix?

There is a form in which there are 3 fields: name, email, attached file
The code that sends the form according to the template:

$SITE_ID = 's1';

$EVENT_TYPE = 'form_job_vacancy';

$arMailFields = array(
    'NAME' => $_POST["form_user_name"],
    'EMAIL' => $_POST["form_user_email"],
    'NAME_JOB' => $_POST["form_user_name_job"],
    'CURL_FILE_PATH' => $_COOKIE['curl'],
);

$arMailFields_clear=array();

foreach ($arMailFields as $key => $value)
{
    $input_text = strip_tags($value);
    $input_text = htmlspecialchars($input_text);
//$input_text = mysql_escape_string($input_text);
    $arMailFields_clear[$key]=$input_text;
}

CEvent::Send("FORM_FILLING_FORM_JOB_VACANCY", $SITE_ID, $arMailFields_clear, "N");

How can I make this template have an attached file from the form? (I have full path to this file)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ilya, 2021-07-27
@rpsv

If the file is always the same, then correct the template itself in the admin panel ("Mail Templates").
If not, then send the file with 6 parameters: https://dev.1c-bitrix.ru/api_help/main/reference/c...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question