I'm using PHPMailer. I have to send two attachments and both are links (one is base64 image and the second one is url).
// Variables with images $croped_img = 'data:image/jpg;base64,/extreme_long_code_here'; $photo_thumbnail_url = 'http://t2.ftcdn.net/jpg/00/76/44/75/400_F_76447580_gOWAV0P8APW0iC51OsW5huD6qoiEsh7O.jpg'; // PHPMailer $mail->addAttachment('$photo_thumbnail_url', 'selected.jpg'); $mail->addAttachment('$croped_img', 'croped_img.jpg');
PHPMailer works because if I send e-mail in that form, attachments do not come.
But if I link local image e.g.
'images/abc.jpg' then they comes.
What php functions should I use to send my variables as e-mail attachments?