在PHP中发送电子邮件之前,如何验证SMTP凭据? [英] How to validate SMTP credentials before sending email in PHP?

查看:92
本文介绍了在PHP中发送电子邮件之前,如何验证SMTP凭据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于很难找到答案,因此我认为这可能是不可能的.如果是这样,我想确认这是不可能的.

Since it's so hard to find an answer, I'm thinking this might be impossible. If so, I'd like confirmation that it's impossible.

推荐答案

这并非不可能.

您可以自己对SMTP交互进行编程,并在SMTP协议中检查是否接受了凭据的确认.对于这种方法,您必须与SMTP服务器进行套接字级别的通信(例如,使用[PHP套接字]服务 1 ).

You can program the SMTP interaction yourself and check for confirmation in the SMTP protocol that the credentials were accepted. For that approach, you would have to do socket-level communication with the SMTP server (e.g. using the [PHP Sockets] service1).

要了解SMTP协议的工作原理,请尝试通过Telnet手动进行一次.

To learn how the SMTP protocol works, try doing that with Telnet once by hand.

http://technet.microsoft.com /en-us/library/aa995718(v=exchg.65).aspx

这篇关于在PHP中发送电子邮件之前,如何验证SMTP凭据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆