PHP mail: What does -f do?

前端 未结 3 1802
鱼传尺愫
鱼传尺愫 2021-01-17 11:35

While troubleshooting a contact form with an e-mail host they told me to use \'-f\' in the from address of the php mail function. What does the \"-f\" flag do and why would

3条回答
  •  别那么骄傲
    2021-01-17 12:13

    The -f option is to set the bounce mail address. Sending a message without one can negatively influence the spam-score that is being calculated over the message. Messages with low scores sometimes get filtered out for certain hosts.

    You can use https://www.mail-tester.com/ to test the score of your message. You can expirement with or without the -f flag and see the score change.

提交回复
热议问题