How to send html table in email body in php?

后端 未结 4 887
天涯浪人
天涯浪人 2020-12-11 07:09

I am sending dynamically creating html table in email body but in the email I receive the html code instead of displaying a table. Please help me. Here is my code.



        
4条回答
  •  没有蜡笔的小新
    2020-12-11 07:34

    First of all, I would suggest using the Pear Mail extension (it's supplied with the basic build of php), because using the mail() function imo, is not as good, using th pear mail class, you can also set the mime type easily.

    Mail_mime class

    Please keep in mind that alot of mail services have limited (if any) support for HTML messages, I don't know the support level for tables, however.

提交回复
热议问题