0
I’m trying to do this way, but the attachment is not sent, only the email.
$fileName = 'Arquivo'.date('d-m-Y H-i').'.xlsx';
$directory = $_SERVER['DOCUMENT_ROOT'].'/local/plugin/exports/'.$fileName;
# Envia e-mail para o supervisor
$userMail = $DB->get_record('user', ['id' => 2]);
email_to_user(
$userMail,
$userMail,
'Assunto',
'Mensagem',
'Mensagem',
$directory,
$fileName
);
Using the email_to_user
it is possible?
I think the file name could not have space
Arquivo15-03-2018 13-28.xlsx
.– Homer Simpson
I’m gonna test it, huh!
– Diego Souza
It didn’t work. You tricked me!
– Diego Souza
Oh! They already voted negative...! And they didn’t even mention the reason. They didn’t even edit if they saw something wrong... For these and others that...
– Diego Souza