B
B
BonBon Slick2017-02-19 21:18:23
PHP
BonBon Slick, 2017-02-19 21:18:23

Maigun- Client error: `POST https://api.m...s.mime` resulted in a `404 NOT FOUND` response:?

Sending from Localhost, Windows 10, Openserver!
.env settings:

MAIL_DRIVER=mailgun
MAIL_HOST=smtp.mailgun.org
MAIL_PORT=587
[email protected]
MAIL_PASSWORD=0dc42c9b6f41****
MAIL_ENCRYPTION=tls

MAILGUN_DOMAIN=sandbox8f2a44666f194644b026b0c188ab2497.mailgun.org
MAILGUN_SECRET=key-bb6ec37e9d79bdf76e*****

services.php settings:
'mailgun' => [
        'domain' => env('sandbox8f2a44666f194644b026b0c188ab2497.mailgun.org'),
        'secret' => env('key-bb6ec37e9d79bdf76e****'),
    ],

Controller:
Mail::send('emails.csrfImported', $user, function($message) use ($user) {
        $message->to($user['email']);
        $message->subject('Mailgun Testing');
    });
    dd('Mail Send Successfully');

Mistake:
ClientException in RequestException.php line 111:
Client error: `POST https://api.mailgun.net/v3//messages.mime` resulted in a `404 NOT FOUND` response:

<!doctype html>
<!--[if lt IE 7]> <html class="lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="lt-ie9 l (truncated...)
in RequestException.php line 111
at RequestException::create(object(Request), object(Response)) in Middleware.php line 65
at Middleware::GuzzleHttp\{closure}(object(Response)) in Promise.php line 203
at Promise::callHandler(1, object(Response), array(object(Promise), object(Closure), null)) in Promise.php line 156
at Promise::GuzzleHttp\Promise\{closure}() in TaskQueue.php line 47
at TaskQueue->run(true) in Promise.php line 246
at Promise->invokeWaitFn() in Promise.php line 223
at Promise->waitIfPending() in Promise.php line 267
at Promise->invokeWaitList() in Promise.php line 225
at Promise->waitIfPending() in Promise.php line 62
at Promise->wait() in Client.php line 129
at Client->request('post', 'https://api.mailgun.net/v3//messages.mime', array('auth' => array('api', null), 'multipart' => array(array('name' => 'to', 'contents' => '[email protected]'), array('name' => 'message', 'contents' => 'Message-ID: <2e8f99b1b97d928c9fca5....

What is the problem ? How to fix?
I also tried Google smtp, there is an error on the error, I tried to set it up for 30-40 minutes. I went through the entire Google search, the answers on the first page for the error request are inconclusive.
Expected response code 250 but got code "530", with message "530-5.5.1 Authentication Required....

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Valeriy Zabrodin, 2017-11-29
@BonBonSlick

'mailgun' => [
        'domain' => env('sandbox8f2a44666f194644b026b0c188ab2497.mailgun.org'),
        'secret' => env('key-bb6ec37e9d79bdf76e****'),
    ],

fix it for
'mailgun' => [
        'domain' => env('MAILGUN_DOMAIN'),
        'secret' => env('MAILGUN_SECRET'),
    ],

the env function takes your settings from the .env file specified by the key, and you specified direct values ​​​​in it

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question