I
I
IvanN7772018-09-27 16:47:02
1C-Bitrix
IvanN777, 2018-09-27 16:47:02

Bitrix how to attach a file in an attack in a letter?

Bitrix has sending letters

CEvent::Send('COUPON_OIL', 's1', $emailData, 'Y', "", array($fid));

Where $fid is the file ID.
But I'm generating a pdf and don't want to save it because it's not needed for this project.
And even if I wanted to save, for the sake of sending, it is not clear where to get the data from and why to specify the module.
The name with or without a path is not clear at all.
$fileData = array ( 
    "name" =>     
    "size" =>    
    "tmp_name" =>  
    "type" =>     
    "old_file" =>  "", 
    "del" =>       
    "MODULE_ID" => 
  ); 

  $fid = CFile::SaveFile($arr_file, "");

It is not clear how to write a temporary file here to attach it to an attack or an existing one.
In the $_FIlES example, but I don’t need it, a very simple task in Bitrix turned into hell

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexander, 2018-09-27
@idruweb

see other examples

A
Alexey Emelyanov, 2018-09-27
@babarun

The abundance of questions indicates that you did not read the documentation at all, but copied the example in the hope that it would work by itself.

But I generate pdf and don't want to save it
Is the generated pdf located in memory? Most likely it is in any case saved in somewhere at a pace on the disk.

I
IvanN777, 2018-09-28
@IvanN777

This helped
https://ru.stackoverflow.com/questions/588207/%D0%...
phpjs.ru/2017/06/16/%D0%B1%D0%B8%D1%82%D1%80% D0%B8...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question