drgovyk64676 2018-08-08 16:43
浏览 177

使用mailx通过mail()PHP发送HTML

I installed mailx to send mails, I am able to send mails through PHP using this function.

mail($to_email, $subject, $message, $header)

The thing is that I receive the html as attachment. Then if I just

mail($to_email, $subject, 'hello world', $header)

I got plain text.

How can I send the mail as html. I thing that mailx is ignoring headers. I am working on centos 7

I tryied config sendmail to do this, but I cant change the setfrom paramenter, because I am relaying to a smtp server which only use an specific email to send notifications.

This works perfect if I use mail in windows, the problem happen with mailx in centos.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 求TYPCE母转母转接头24PIN线路板图
    • ¥100 国外网络搭建,有偿交流
    • ¥15 高价求中通快递查询接口
    • ¥15 解决一个加好友限制问题 或者有好的方案
    • ¥15 急matlab编程仿真二阶震荡系统
    • ¥20 TEC-9的数据通路实验
    • ¥15 ue5 .3之前好好的现在只要是激活关卡就会崩溃
    • ¥50 MATLAB实现圆柱体容器内球形颗粒堆积
    • ¥15 python如何将动态的多个子列表,拼接后进行集合的交集
    • ¥20 vitis-ai量化基于pytorch框架下的yolov5模型