简体   繁体   English

Windows Apache和PHP上通过Wordpress的SSL SMTP邮件不起作用

[英]SSL SMTP mail on Windows Apache and PHP via Wordpress not working

I cannot seem to send an SMTP email (tried multiple plugins as I know the PHP Mail() is severely limited) via my wordpress UNLESS I send using a NON-SSL SMTP connection like GoDaddy supports. 我似乎无法通过wordpress发送SMTP电子邮件(尝试了多个插件,因为我知道PHP Mail()受到严格限制),除非我使用像GoDaddy支持的NON-SSL SMTP连接发送。 I have tried using Google Apps AND Amazon's AWS SES email service, and it always fails with a message similar to "could not connect to SMTP". 我尝试使用Google Apps和Amazon的AWS SES电子邮件服务,但它始终失败,并显示类似“无法连接到SMTP”的消息。 I have tried the same SMTP configurations on third party email apps (as well as one that I built myself) and they work, so I do not believe it to be a simple case of using the incorrect SMTP info. 我已经在第三方电子邮件应用程序(以及我自己构建的应用程序)上尝试了相同的SMTP配置,并且它们可以正常工作,因此我认为这不是使用不正确的SMTP信息的简单情况。

My WAMP setup was NOT a prebuilt kit, but instead combined & configured from the individual components. 我的WAMP设置不是预构建的套件,而是由各个组件组合和配置的。

I believe there may be a configuration setting that needs to be changed when using a Windows based Apache/PHP setup from scratch in order to send SMTP mail. 我相信从头开始使用基于Windows的Apache / PHP设置来发送SMTP邮件时,可能需要更改配置设置。 Again, I would suspect it was simply due to a wordpress plugin problem, but after trying at least 4-5 different plugins, I am starting to believe it to be within the configuration settings. 同样,我怀疑这仅仅是由于wordpress插件问题引起的,但是在尝试了至少4-5个不同的插件之后,我开始相信它在配置设置之内。

System current is running:
Windows 2008 R2
Apache 2.4.6 (x64 using VC11)
PHP 5.5.3 (ThreadSafe - x64 using VC11)
Wordpress 3.8.3

I am willing to find and paste in any settings or info that may be helpful in deciphering this problem. 我愿意查找并粘贴任何可能有助于破解此问题的设置或信息。

Thanks in advance for any help or suggestions! 在此先感谢您的帮助或建议!

It seems that as almost every smtp email plugin in WP used PHPMailer....and since those plugins worked when sending unencrpyted SMTP transactions for emails, the problem was that in the PHP.ini file, the OpenSSL module was commented out. 似乎WP中几乎每个smtp电子邮件插件都使用PHPMailer ....,并且由于这些插件在发送电子邮件的未加密SMTP事务时起作用,因此问题在于PHP.ini文件中的OpenSSL模块已被注释掉。 So I removed the comment, saved the PHP.ini, and restarted the Apache service for good measure and it worked. 因此,我删除了注释,保存了PHP.ini,并重新启动了Apache服务,使其正常工作。

I mistakenly though all OpenSSL support was enabled, but it turns out I only had the Apache OpenSSL module enabled...and using cURL in PHP must not rely on OpenSSL...as that was communicating with HTTPS sites. 我错误地虽然启用了所有OpenSSL支持,但事实证明我只启用了Apache OpenSSL模块...并且在PHP中使用cURL一定不能依赖OpenSSL ...这是与HTTPS站点进行通信的原因。

For reference, the PHP.INI module was listed as: extension=php_openssl.dll 作为参考,PHP.INI模块被列出为:extension = php_openssl.dll

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

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