函数set_magic_quotes_runtime()在phpmailer中已弃用

Help me, 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 &nbsp; ". $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' />.";

add these code into the top of your script

@set_magic_quotes_runtime(false);
ini_set('magic_quotes_runtime', 0);

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

The developers of the software often make updates. You can install their newest version, and it shall be without this warning.