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:xampphtdocsformclass.phpmailer.php on line 1480
Deprecated: Function set_magic_quotes_runtime() is deprecated in C:xampphtdocsformclass.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' />.";
Advertisement
Answer
add these code into the top of your script
@set_magic_quotes_runtime(false); ini_set('magic_quotes_runtime', 0);