简体   繁体   English

如何设置PHP在hMailServer上使用邮件或类似内容?

[英]How do I set up PHP to use mail or similar with hMailServer?

My environment is as follows: 我的环境如下:
-Windows IIS7 + Windows DNS Server (all DNS records and IIS7 settings are fully accessible by me). -Windows IIS7 + Windows DNS服务器(我可以完全访问所有DNS记录和IIS7设置)。
-hMailServer with SMTP listening on 25. -hMailServer,SMTP侦听25。

I guess that's about it, my actual intentions are as follows: 我想就是这样,我的实际意图如下:
I want to use WordPress for one of my domains which is pointed to the server, but currently it is unable to send emails (for example password reminders). 我想将WordPress用于指向服务器的我的一个域,但是目前它无法发送电子邮件(例如密码提示)。

My knowledge is not exactly amazing for stuff like this, so be gentle to explain. 对于这样的事情,我的知识并不完全是惊人的,因此请谨慎解释。 :> :>

You have to configure your SMTP settings in the php.ini file (located in the php-directory). 您必须在php.ini文件(位于php目录中)中配置SMTP设置。 If you don't use smtpauth/ssl this will do the trick. 如果您不使用smtpauth / ssl,则可以解决问题。

[mail function]
; For Win32 only.
SMTP = 192.168.1.10

; For Win32 only.
sendmail_from = john@example.com

However, the standard php mail function neither supports smtpauth nor ssl . 但是,标准的php邮件功能既不支持smtpauth也不支持ssl Have a look at the specs . 看一下规格

As you are running windows, you can use fake sendmail. 在运行Windows时,您可以使用伪造的sendmail。 This supports auth and ssl. 这支持auth和ssl。 Read this guide , and it should work. 阅读本指南 ,它应该可以工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM