简体   繁体   中英

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. 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. Please upgrade or add the address to authorized recipients in Account Settings. Unable to send email using 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. This is not credentials problem either cause I can see the logs on Mailgun dashboard.

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. - They should put this message on the top of their registration page!!! It's still free for first 10,000 though.

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

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). 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. credit card is to be added only when the 10000 email quota is exceeded.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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