Jump to content

file attachment in mail send


Recommended Posts

Hello!

 

Mail::Send($id_lang, $template, $subject, $templateVars, $to, $toName = NULL, $from = NULL, $fromName = NULL, $fileAttachment = NULL, $modeSMTP = NULL)
it sends email to an email address.

I try to attach a file, it was attached and sent but that file is something like a (3)

 

I modified password.php (just for testing) and I write

 

Mail::Send(intval($cookie->id_lang), 'password', 'Your password', array('{email}' => $customer->email, '{surname}' => $customer->surname, '{name}' => $customer->name, '{passwd}' => $password), $customer->email, $customer->name.' '.$customer->surname,'name@ email.com','name','robots.txt');

 

in my email as attachment is just a file named r (size 1kb).

 

what should i write that the function Mail::Send to send a file attachment (i want to send a pdf file)?

 

------------------- edit ------------

i've solved the problem.

$fileAttachment is an array with indexes content, name, mime type.

Link to comment
Share on other sites

  • 1 year later...
×
×
  • Create New...