PHP - 纯文本电子邮件

How to turn this into a plain text email?

 $bound_text=md5(uniqid(time()));
    $headers.="MIME-Version: 1.0
" . "Content-Type: multipart/mixed; boundary=\"PHP-mixed-$bound_text\"
";

    $message="--PHP-mixed-$bound_text
"      
                ."Content-Type: text/html; charset=\"utf-8\"
"
                ."Content-Transfer-Encoding: 7bit

"  
                ."<html><head></head><body>"
                ."<div style=\"font-family: Arial, Helvetica, sans-serif; font-size : 1.3em; color: #000000;width: 100%;text-align: left;\">$text_message</div></body></html>

"  
                ."--PHP-mixed-$bound_text
"  
                ."Content-Transfer-Encoding: base64
"
                ."Content-Disposition: attachment; filename=\"$attachment\"
"
    ."Content-Type: image/jpeg; name=\"$attachment\"

"
     .chunk_split($file)
            ."

"
                ."--PHP-mixed-$bound_text--

";

    }

Is it just removing the HTML part and changing text/html into text/plain?

Removing the HTML should do the trick but you'll probably want to change the content-type to text/plain as well:

."Content-Type: text/plain; charset=\"utf-8\"
"

(I would have let a comment suffice but I can't post comments yet :))