简体   繁体   English

PHP Codeigniter Mailgun-无法发送电子邮件

[英]PHP Codeigniter Mailgun - can't send email

I've already confirmed my custom domain and I'm always get this error: 我已经确认了我的自定义域,并且总是收到以下错误消息:

554 Free accounts are for test purposes only. 554免费帐户仅用于测试目的。 Please upgrade or add the address to authorized recipients in Account Settings. 请在“帐户设置”中升级地址或将地址添加到授权收件人。 The following SMTP error was encountered: 554 Free accounts are for test purposes only. 遇到以下SMTP错误:554免费帐户仅用于测试目的。 Please upgrade or add the address to authorized recipients in Account Settings. 请在“帐户设置”中升级地址或将地址添加到授权收件人。 Unable to send email using PHP SMTP. 无法使用PHP SMTP发送电子邮件。 Your server might not be configured to send mail using this method. 您的服务器可能未配置为使用此方法发送邮件。

Config: 配置:

$this->email->initialize(array(
        'mailtype'  => 'html',
        'protocol'  => 'smtp',
        'smtp_timeout'  => 30,
        'smtp_host' => 'ssl://smtp.mailgun.org',
        'smtp_port' => '465',
        'smtp_user' => '***',
        'smtp_pass' => '***'
    ));

What could be wrong? 有什么事吗 Try in both localhost / server - and the same error is shown. 在localhost / server中尝试-并显示相同的错误。 This is not credentials problem either cause I can see the logs on Mailgun dashboard. 这不是凭据问题,因为我可以在Mailgun仪表板上看到日志。

Pretty sure that they changed their policy recently: "Without a credit card you are restricted to authorized recipients only." 可以肯定的是,他们最近更改了政策:“没有信用卡,您只能使用经过授权的收件人。” You just need add CC to make it work. 您只需要添加CC即可使其工作。 - They should put this message on the top of their registration page!!! -他们应该将此消息放在其注册页面的顶部!!! It's still free for first 10,000 though. 不过,前10,000个仍然免费。

有点烦人-但是解决方案是在帐户中添加信用卡。

credit card need not be added. 无需添加信用卡。 the error message clearly shows that no authorized recipients have been added. 该错误消息清楚地表明未添加任何授权的收件人。 Mailgun allows 10,000 free emails for 30days, which can be used for testing (even from a local host) provided authorized email ids are added (upto 5). Mailgun在30天之内允许10,000个免费电子邮件,如果添加了授权的电子邮件ID(最多5个),则可以用于测试(甚至来自本地主机)。 this can be done on the dashboard page. 这可以在仪表板页面上完成。 instructions given in the documentation. 文档中给出的说明。 I have been testing out my mailer using a localhost (WAMP server) on 3 authorized email recipients that i've added. 我一直在使用本地主机(WAMP服务器)对我添加的3个授权电子邮件收件人进行邮件测试。 credit card is to be added only when the 10000 email quota is exceeded. 仅当超过10000个电子邮件配额时才添加信用卡。

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

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