当前位置: 首页 > 工具软件 > PHPMailer > 使用案例 >

PHPMailer Sample

衡翰藻
2023-12-01

以下来自PHPMailer的readme文件:

Installation:

Copy class.phpmailer.php into your php.ini include_path. If you are
using the SMTP mailer then place class.smtp.php in your path as well.
In the language directory you will find several files like
phpmailer.lang-en.php.  If you look right before the .php extension
that there are two letters.  These represent the language type of the
translation file.  For instance "en" is the English file and "br" is
the Portuguese file.  Chose the file that best fits with your language
and place it in the PHP include path.  If your language is English
then you have nothing more to do.  If it is a different language then
you must point PHPMailer to the correct translation.  To do this, call
the PHPMailer SetLanguage method like so:

// To load the Portuguese version
$mail->SetLanguage("br", "/optional/path/to/language/directory/");

That's it.  You should now be ready to use PHPMailer!


A Simple Example:

 

 

 

 

 

添加以下两行解决中文乱码问题:

 

$mail->CharSet = "UTF-8" ;
$mail->Encoding = "base64" ;

 类似资料:

相关阅读

相关文章

相关问答