开发者

mailing function in php

开发者 https://www.devze.com 2022-12-19 16:53 出处:网络
I am using php Mailing function in my project. i have sent the values in a php var开发者_运维技巧iable

I am using php Mailing function in my project. i have sent the values in a php var开发者_运维技巧iable

Like

$myvalue="Universal Laser Systems®";
 $mailbody="<table><tr><td>".<?=$myvalue?>."</td></tr></table>";

But my email is showing

Univer! sal Laser Systems®

How i avoid such a special charector...........


You need to set the email header so that it can correctly handle your special characters.

Content-Type: text/html; charset=UNICODE-1-1-UTF-8

Try that and see how you go.

You can see an example of setting the headers in the manual found here


use a mail class, like Rmail

http://www.phpguru.org/static/mime.mail.html

makes it easyer and more likely to end up in a mailbox the way you want it.


If you are using phpmailer then use the SMTP class and include it and for html body use the Content-Type: text/html; charset=UNICODE-1-1-UTF-8

0

精彩评论

暂无评论...
验证码 换一张
取 消