Monday, 23 December 2013

How to Attacch File/Image From External URL(remote file/image) to e-mail

How to Attacch File/Image From External URL to e-mail Iam Previously explain about sending e-mails using PHPmailer and Gmail server in this added a code for attachment File/Image from Folder But
Now i'am Explain about how to attach a File/Image from External URl.

General File/Image attachemnet:
File/Image attachment from Remote:
$string = file_get_contents(""); 

$mail->AddStringAttachment($string, "01182013_220715.jpg", $encoding = 'base64', $type = 'application/octet-stream');
In case file_get_cotents field to load file use cURL,
Read More info about file_get_contents and cURL Click Here

No comments:

Post a Comment