简体   繁体   中英

PHP mailer to send mail with HTML contents

I am using php mail method to send HTML mails to people from my domain. I am using the following code to send mail

    $headers  = 'MIME-Version: 1.0' . "\r\n";
    $headers .= 'Content-type:text/html; charset=iso-8859-1' . "\r\n"; 
    mail($id, $subject, $message,$headers);

However, the problem is that the code doesnt work when the size of message increases. It works fine for smaller messages.

Is there any way to overcome that ??

I resolved my issue. It was due to less number of breaking tags br in the html code. I introduced some br tags here and there and it flew :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM