PHP邮件功能如何在场景后工作?

时间:2017-01-27 12:28:09

标签: php email

我做了很多谷歌搜索,但找不到我具体问题的答案。

我理解mail()的语法和编辑php.ini文件的步骤。但是,当我不提供身份验证信息时,为什么SMTP服务器会接受连接请求?

例如,如果我想通过我的Gmail帐户发送电子邮件,我必须使用我的电子邮件地址和密码登录。但似乎使用PHP mail()使我完全绕过这一步。

mail()函数如何在场景后工作?

1 个答案:

答案 0 :(得分:4)

根据PHP的mail()函数和相关RFC的手册

并列在:

  

“注意:   以下RFC可能很有用:»RFC 1896,»RFC 2045,»RFC 2046,»RFC 2047,»RFC 2048,»RFC 2049和»RFC 2822。“

来自RFC 2049 http://www.faqs.org/rfcs/rfc2049.html


   [RFC-1421]
        Linn, J., "Privacy Enhancement for Internet Electronic
        Mail:  Part I -- Message Encryption and Authentication
        Procedures", RFC 1421, IAB IRTF PSRG, IETF PEM WG,
        February 1993.

http://www.faqs.org/rfcs/rfc1421.html

互联网电子邮件的隐私增强功能: 第一部分:消息加密和认证程序


        1.  This RFC's measures are restricted to implementation at
            endpoints and are amenable to integration with existing
            Internet mail protocols at the user agent (UA) level or
            above, rather than necessitating modifications to existing
            mail protocols or integration into the message transport
            system (e.g., SMTP servers).

        2.  The set of supported measures enhances rather than restricts
            user capabilities.  Trusted implementations, incorporating
            integrity features protecting software from subversion by
            local users, cannot be assumed in general.  No mechanisms
            are assumed to prevent users from sending, at their
            discretion, messages to which no PEM processing has been
            applied. In the absence of such features, it appears more
            feasible to provide facilities which enhance user services
            (e.g., by protecting and authenticating inter-user traffic)
            than to enforce restrictions (e.g., inter-user access
            control) on user actions.

        3.  The set of supported measures focuses on a set of functional
            capabilities selected to provide significant and tangible
            benefits to a broad user community.  By concentrating on the
            most critical set of services, we aim to maximize the added
            privacy value that can be provided with a modest level of
            implementation effort.