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); 

http://phpmailer.worxware.com/index.php?pg=tutorial#3


Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -