PHP mail formatting issue - Why do CRLF header line endings break HTML email in Outlook?

前端 未结 4 1213
北海茫月
北海茫月 2020-12-18 13:49

I\'m using the PHP native mail() function to send HTML emails and have a formatting problem in the users most common email client - Outlook 2007

4条回答
  •  一向
    一向 (楼主)
    2020-12-18 14:01

    You have 2 solutions:

    1. Upgrade Postfix to +2.9 which has "sendmail_fix_line_endings" (finally!!!) See: Postfix documentation
    2. Install Sendmail (working fine!)

    I have a VMware image with a LAMP stack. In order to send email, I finally decided to:

    • install Sendmail
    • use the smtp of my ISP (as it is only a dev box).

    For the sendmail part, you can follow this: http://www.geoffke.be/nieuws/13/

    IMPORTANT: Some webhosters may use only stable packages which means you can have... a Postfix older than 2.9!!! Exemple: http://packages.debian.org/search?keywords=postfix

提交回复
热议问题