php - PHPMailer attachment, doing it without a physical file -
so:
// setup mail class, recipients , body $mailer->addattachment('/home/mywebsite/public_html/file.zip', 'file.zip'); addattachment function has 4 arguments: addattachment(path_to_file, filename, encoding, header_type)
i used use xmail() , when added attachment here, passed filename , content, should in it.
like this:
$xmail->addattachment('myamazingfile.pdf', $content);
how can make work same way, when call addattachment()
phpmailer class, can either pass same or it, dont need have actual file on server send?
addstringattachment($string,$filename,$encoding,$type)
eg
$mail = new phpmailer(); $mail->addstringattachment($string,$filename,$encoding,$type);
Comments
Post a Comment