• <bdo id='w0k2e'></bdo><ul id='w0k2e'></ul>

    <legend id='w0k2e'><style id='w0k2e'><dir id='w0k2e'><q id='w0k2e'></q></dir></style></legend>

    <small id='w0k2e'></small><noframes id='w0k2e'>

      <tfoot id='w0k2e'></tfoot>
    1. <i id='w0k2e'><tr id='w0k2e'><dt id='w0k2e'><q id='w0k2e'><span id='w0k2e'><b id='w0k2e'><form id='w0k2e'><ins id='w0k2e'></ins><ul id='w0k2e'></ul><sub id='w0k2e'></sub></form><legend id='w0k2e'></legend><bdo id='w0k2e'><pre id='w0k2e'><center id='w0k2e'></center></pre></bdo></b><th id='w0k2e'></th></span></q></dt></tr></i><div id='w0k2e'><tfoot id='w0k2e'></tfoot><dl id='w0k2e'><fieldset id='w0k2e'></fieldset></dl></div>

      使用 XAMPP 1.8.0、MercuryMail 和 mail() 在收件箱中没有收到邮件

      No mail received in inbox with XAMPP 1.8.0, MercuryMail and mail()(使用 XAMPP 1.8.0、MercuryMail 和 mail() 在收件箱中没有收到邮件)
    2. <tfoot id='uWkm6'></tfoot>
      • <legend id='uWkm6'><style id='uWkm6'><dir id='uWkm6'><q id='uWkm6'></q></dir></style></legend>
          <tbody id='uWkm6'></tbody>

        <i id='uWkm6'><tr id='uWkm6'><dt id='uWkm6'><q id='uWkm6'><span id='uWkm6'><b id='uWkm6'><form id='uWkm6'><ins id='uWkm6'></ins><ul id='uWkm6'></ul><sub id='uWkm6'></sub></form><legend id='uWkm6'></legend><bdo id='uWkm6'><pre id='uWkm6'><center id='uWkm6'></center></pre></bdo></b><th id='uWkm6'></th></span></q></dt></tr></i><div id='uWkm6'><tfoot id='uWkm6'></tfoot><dl id='uWkm6'><fieldset id='uWkm6'></fieldset></dl></div>

            1. <small id='uWkm6'></small><noframes id='uWkm6'>

                <bdo id='uWkm6'></bdo><ul id='uWkm6'></ul>

                本文介绍了使用 XAMPP 1.8.0、MercuryMail 和 mail() 在收件箱中没有收到邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我使用包含 Apache 2.4.2、PHP 5.4.5 和 MySQL 5.5 的 XAMPP 1.8.0 升级了我的本地服务器.我通过运行 MercuryMail 使用 PHP mail() 函数发送邮件,但我的收件箱中没有收到电子邮件.
                当我使用 Mozilla Thunderbird 进行测试时,发送邮件正常.并且 mail() 函数似乎没有发出错误.

                I upgraded my local server using XAMPP 1.8.0 which contains Apache 2.4.2, PHP 5.4.5 and MySQL 5.5. I send mails with PHP mail() function by running MercuryMail, but no email received in my inbox.
                Sending mails are working when I tested with Mozilla Thunderbird. And the mail() function seems to be working with no error issued.

                我在我的 XAMPP 安装路径 D:xamppphp 中检查了 php.ini.我在下面看到了这个

                I checked php.ini in my XAMPP installation path D:xamppphp. I saw this below

                [mail function]  
                ; XAMPP: Comment out this if you want to work with an SMTP Server like Mercury  
                ; SMTP = localhost  
                ; smtp_port = 25  
                
                ; For Win32 only.  
                ; http://php.net/sendmail-from  
                ; sendmail_from = postmaster@localhost  
                
                ; XAMPP IMPORTANT NOTE (1): If XAMPP is installed in a base directory with spaces (e.g. c:program filesD:xampp) fakemail and mailtodisk do not work correctly.  
                ; XAMPP IMPORTANT NOTE (2): In this case please copy the sendmail or mailtodisk folder in your root folder (e.g. C:sendmail) and use this for sendmail_path.    
                
                ; XAMPP: Comment out this if you want to work with fakemail for forwarding to your mailbox (sendmail.exe in the sendmail folder)  
                ; sendmail_path = ""D:xamppsendmailsendmail.exe" -t"  
                
                ; XAMPP: Comment out this if you want to work with mailToDisk, It writes all mails in the D:xamppmailoutput folder  
                ; sendmail_path = "D:xamppmailtodiskmailtodisk.exe"  
                

                我调整了一些 SMTP 设置组合.
                我注释掉了主机和端口

                I tweaked some combination of SMTP settings.
                I commented out host and port

                ; XAMPP: Comment out this if you want to work with an SMTP Server like Mercury  
                SMTP = localhost  
                smtp_port = 25
                

                我注释掉了 sendmail_path,但它不起作用.无法发送邮件.

                I commented out sendmail_path, but it did not work. Mail could not be sent.

                ; XAMPP: Comment out this if you want to work with fakemail for forwarding to your mailbox (sendmail.exe in the sendmail folder)  
                sendmail_path = ""D:xamppsendmailsendmail.exe" -t"  
                

                再次,我注释掉了另一个 sendmail_path 以使用 mailToDisk

                Again, I commented out anothor sendmail_path to work with mailToDisk

                ; XAMPP: Comment out this if you want to work with mailToDisk, It writes all mails in the D:xamppmailoutput folder  
                sendmail_path = "D:xamppmailtodiskmailtodisk.exe"  
                

                似乎工作正常,但收件箱中没有收到邮件.D:xamppmailoutput

                It seems working, but no mail received in inbox. Nothing found in D:xamppmailoutput

                在 php 邮件日志 (D:xamppphplogsphp_mail.log) 中,我发现了几行可能表明正在发送邮件的日志行.

                In php mail log (D:xamppphplogsphp_mail.log), I found several log lines which likely saying mails were sending.

                mail() on [D:xampphtdocs....:127]: To: sithu@localhost.com -- Headers: MIME-Version: 1.0  Content-type: text/html; charset=text/html  Return-Path:Sithu <stk@localhost.com>  From: Sithu <stk@localhost.com>  Reply-To: Sithu <stk@localhost.com>  
                mail() on [D:xampphtdocs....:127]: To: test@localhost.com -- Headers: MIME-Version: 1.0  Content-type: text/html; charset=text/html  Return-Path:admin@localhost.com  From: admin@localhost.com  Reply-To: admin@localhost.com  
                mail() on [D:xampphtdocs....:127]: To: test@localhost.com -- Headers: MIME-Version: 1.0  Content-type: text/html; charset=text/html  Return-Path:Members <admin@localhost.com>  From: Members <admin@localhost.com>  Reply-To: Members <admin@localhost.com> 
                

                我也尝试注释掉 sendmail_from,但没有成功.

                I also tried to comment out sendmail_from, but no luck.

                ; For Win32 only.  
                ; http://php.net/sendmail-from  
                sendmail_from = postmaster@localhost  
                

                我还缺少什么配置吗?


                Mercury 邮件服务器正在运行.
                每当我更新 php.ini 时,我都会重新启动 Apache 服务器.


                Mercury mail server is running.
                Whenever I updated php.ini, I restarted Apache server.

                推荐答案

                我只需要配置D:xamppsendmailsendmail.ini默认情况下,它包含行

                I just need to configure D:xamppsendmailsendmail.ini By default, it contains the line

                smtp_server=mail.mydomain.com
                

                我不得不把它改成

                smtp_server=localhost
                

                无需在旧版本的 XAMPP 中进行配置.
                D:xamppphpphp.ini[mail function]的正确配置是

                No need to configure this in the older versions of XAMPP.
                The correct configuration for [mail function] in D:xamppphpphp.ini is

                ; XAMPP: Comment out this if you want to work with an SMTP Server like Mercury
                SMTP = 127.0.0.1
                smtp_port = 25
                
                ; XAMPP IMPORTANT NOTE (1): If XAMPP is installed in a base directory with spaces (e.g. c:program filesD:xampp) fakemail and mailtodisk do not work correctly.
                ; XAMPP IMPORTANT NOTE (2): In this case please copy the sendmail or mailtodisk folder in your root folder (e.g. C:sendmail) and use this for sendmail_path.  
                
                ; XAMPP: Comment out this if you want to work with fakemail for forwarding to your mailbox (sendmail.exe in the sendmail folder)
                sendmail_path = ""D:xamppsendmailsendmail.exe" -t"
                
                ; XAMPP: Comment out this if you want to work with mailToDisk, It writes all mails in the D:xamppmailoutput folder
                ; sendmail_path = "D:xamppmailtodiskmailtodisk.exe"
                

                现在,我正在收件箱中接收邮件.请注意D:xampp"是我的XAMPP安装路径.

                Now, I'm receiving mails in my inbox. Please note that "D:xampp" is my XAMPP installation path.

                这篇关于使用 XAMPP 1.8.0、MercuryMail 和 mail() 在收件箱中没有收到邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                Converting string to MySQL timestamp format in php(在php中将字符串转换为MySQL时间戳格式)
                datetime to timestamp(日期时间到时间戳)
                PHP timestamp date to user timezone(PHP时间戳日期到用户时区)
                Converting TIMESTAMP to unix time in PHP?(在 PHP 中将 TIMESTAMP 转换为 unix 时间?)
                Convert ISO 8601 to unixtimestamp(将 ISO 8601 转换为 unixtimestamp)
                Finding days between 2 unix timestamps in php(在php中查找2个unix时间戳之间的天数)
                1. <small id='q7pqF'></small><noframes id='q7pqF'>

                  <i id='q7pqF'><tr id='q7pqF'><dt id='q7pqF'><q id='q7pqF'><span id='q7pqF'><b id='q7pqF'><form id='q7pqF'><ins id='q7pqF'></ins><ul id='q7pqF'></ul><sub id='q7pqF'></sub></form><legend id='q7pqF'></legend><bdo id='q7pqF'><pre id='q7pqF'><center id='q7pqF'></center></pre></bdo></b><th id='q7pqF'></th></span></q></dt></tr></i><div id='q7pqF'><tfoot id='q7pqF'></tfoot><dl id='q7pqF'><fieldset id='q7pqF'></fieldset></dl></div>

                2. <legend id='q7pqF'><style id='q7pqF'><dir id='q7pqF'><q id='q7pqF'></q></dir></style></legend>

                      • <tfoot id='q7pqF'></tfoot>

                          <bdo id='q7pqF'></bdo><ul id='q7pqF'></ul>
                            <tbody id='q7pqF'></tbody>