doumaojin4008
2009-06-08 20:41
浏览 54
已采纳

在freebsd中为php mail()指定smtp服务器?

I have two dedicated servers, one of which is configured for sending email out (SPF, DKIM, other domain whitelisting methods, etc). I need to send email from both servers, but I want to send mail from both servers through the server that's been set up for it.

It doesn't look like I can explicitly set an SMTP server directly in the mail function. Is there a way I can override the value set in php.ini, through .htaccess or something?

图片转代码服务由CSDN问答提供 功能建议

我有两个专用服务器,其中一个配置用于发送电子邮件(SPF,DKIM,其他域名白名单方法) 等)。 我需要从两台服务器发送电子邮件,但我想通过已经为它设置的服务器从两台服务器发送邮件。

看起来我不能明确设置 SMTP服务器直接在邮件功能中。 有没有办法可以覆盖php.ini中设置的值,通过.htaccess或其他东西?

  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 收藏
  • 邀请回答

2条回答 默认 最新

  • douye1876 2009-06-08 20:45
    已采纳

    I would recommend not using the mail command and using a pre-built PHP mailing solution. There are 2 great recommendations at the following: Is this the correct way to send email with PHP?

    In using a pre-built solution, you can have all of your mail go to the same server if you choose.

    评论
    解决 无用
    打赏 举报
查看更多回答(1条)

相关推荐 更多相似问题