I want to embed an image with PHP Mailer version 5.1.. and my PHP version is 5.4.7
The script execution is a success, and I can receive emails with embedded images, but the problem is warnings appear like this:
Deprecated: Function set_magic_quotes_runtime() is deprecated in C:\xampp\htdocs\form\class.phpmailer.php on line 1480
Deprecated: Function set_magic_quotes_runtime() is deprecated in C:\xampp\htdocs\form\class.phpmailer.php on line 1484
and my script is is
$mail->AddEmbeddedImage('filename', 'cid', 'name');
$mail->AddEmbeddedImage('sgu_logo.gif', 'my-pics', 'sgu_logo.gif');
$mail->Body = "Thank you for registering at SGU. For further processing please complete a registration fee before ". $e['testschedule']." <br> For future information please contact us at sgu.ac.id/support <br><br>
<img src='cid:sgu_logo.gif' alt='my-pics' />.";
It's because magic_quotes_runtime functions are deprecated starting from 5.3 PHP version, but 5.1 version of PHPmailer still uses them. Try to upgrade to PHPmailer 5.2, the problem should be solved, more info here: http://code.google.com/a/apache-extras.org/p/phpmailer/source/detail?r=66
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With