Due to display reasons, some spaces in the posted posts have been deleted, causing some errors in usage.
The analysis is as follows:
1. Due to inadvertent modifications, after everyone gets such an excellent class, they always hope to change it to look more comfortable. However, I need to remind you that in this program, sometimes adding or deleting a few spaces will cause program errors.
2. Now I will explain some problems with the program I posted.
Content-Type: There must be several spaces in front of the following 1-2 lines. Please add. The spaces in front of each line in the HTML will not be displayed, so they are not included in the post.
This is what a friend posted earlier. I modified it as follows:
This is a multi-part message in MIME format.
--=====_1__=====
Content-Type: multipart/alternative;
boundary="=====_2__====="
--=====_2__=====
Content-Type: text/plain;
charset="GB2312"
Content-Transfer-Encoding: base64
x+vKudPD1qez1khUTUwguPHKvbXE08q8/sjtvP7AtLLpv7S4w9PKvP4=
--=====_2__=====
Content-Type: text/html;
charset="GB2312"
Content-Transfer-Encoding: base64
PGh0bWw+PGhlYWQ+PC9oZWFkPjxib2R5PjxoMT7A/dfTPC9oMT48L2JvZHk+PC9odG1sPg==
--====== _2__=====--
--=====_1__=====--
Here is an example:
It’s actually very simple.
$sender= new smtp();
$fromname="sony";
$frommail="sonymusic@china.com";
$toname="pbabi";
$tomail ="panbei@163.net";
$subject="An example";
$text_body="Please use an email software that supports HTML format to view this email";
$html_body.="< ;html>