hostmonster主机邮件标识问题

在使用hostmonster主机的mail(),sendmail()函数法邮件时发送用户名显示XXX@box356.hostmonster.com,在邮件用户名中用hostmonster的主机的标识符,怎么样才能使邮件格式为uname@domain.com

解决方法如下:

1.修改你的php.ini里面的sendmail地址sendmail_path = /usr/sbin/sendmail -t -i -f uname@domain.com

2就是规范发邮件的格式:

                   Examples of headers that should work would be:
  • From: user@domain.com
  • From: <user@domain.com>
  • From: “name” user@domain.com

Examples of headers that will NOT work:

  • From: “user@domain.com”
  • From: user @ domain.com