B
B
bichukov2021-11-24 15:43:05
1C-Bitrix
bichukov, 2021-11-24 15:43:05

How to send email with attachment (csv file)?

I'm trying to send a csv file using the send method .
I create the file itself as in this example.

But it doesn't work to send the file.
Is it possible to send it with this method if it was created and saved differently than in the send documentation?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
tgarl, 2021-11-25
@tgarl

possibly.
Most likely you have an error in the code, please provide the send code
here is my example:

$sertik="/upload/new_sert.pdf";
$ob = \Bitrix\Main\Mail\Event::send(array(
  "EVENT_NAME" => "sendGiftSertificat",
  "LID" => "s1",
  "C_FIELDS" => $fil,
  'FILE' => array ($sertik),
));

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question