skip to Main Content

after i click register button i get the error bellow
Swift_TransportException Process could not be started [The system cannot find the path specified. ]
and whene i go to phpmyadmin it seems that i have the new user record in my database
i don’t know what’s the relation between the auth and swiftMailer
i already tried clearing the config using php artisan config:clear changing MAIL_DRIVER, MAIL_HOST, MAIL_PORT i don’t know what to do

this is my .env file

APP_NAME=****
APP_ENV=local
APP_KEY=base64:****
APP_DEBUG=true
APP_URL=****

LOG_CHANNEL=stack

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_DATABASE=db
DB_USERNAME=root
DB_PASSWORD=

BROADCAST_DRIVER=log
CACHE_DRIVER=file
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_DRIVER=smtp
MAIL_HOST=localhost
MAIL_PORT=2525  
MAIL_USERNAME=
MAIL_PASSWORD=
[email protected]
MAIL_FROM_NAME=Example
MAIL_ENCRYPTION=null

AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=

PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1

MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"

and this is the config/mail.php

<?php

return [

    'default' => env('MAIL_MAILER', 'smtp'),
    //'default' => env('MAIL_MAILER', 'sendmail'),


    'mailers' => [
        'smtp' => [
            'transport' => 'smtp',
            'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
            'port' => env('MAIL_PORT', 587),
            'encryption' => env('MAIL_ENCRYPTION', 'tls'),
            'username' => env('MAIL_USERNAME'),
            'password' => env('MAIL_PASSWORD'),
            'timeout' => null,
            'auth_mode' => null,
        ],

        'ses' => [
            'transport' => 'ses',
        ],

        'mailgun' => [
            'transport' => 'mailgun',
        ],

        'postmark' => [
            'transport' => 'postmark',
        ],

        'sendmail' => [
            'transport' => 'sendmail',
            'path' => '/usr/sbin/sendmail -bs',
        ],

        'log' => [
            'transport' => 'log',
            'channel' => env('MAIL_LOG_CHANNEL'),
        ],

        'array' => [
            'transport' => 'array',
        ],

        'failover' => [
            'transport' => 'failover',
            'mailers' => [
                'smtp',
                'log',
            ],
        ],
    ],

    'from' => [
        'address' => env('MAIL_FROM_ADDRESS', '[email protected]'),
        'name' => env('MAIL_FROM_NAME', 'Example'),
    ],


    'markdown' => [
        'theme' => 'default',

        'paths' => [
            resource_path('views/vendor/mail'),
        ],
    ],

];

2

Answers


  1. Chosen as BEST ANSWER

    I found where the error exactly is in my user model. I have this:

    class User extends Authenticatable implements MustVerifyEmail
    

    First, make sure to use the recomended MAIL_DRIVER and MAIL_HOST values. Else, look for anything that has a relation with email in your model. In my case, I simply removed the inmplements.

    class User extends Authenticatable implements MustVerifyEmail
    ```
    to
    ```
    class User extends Authenticatable
    ```
    

  2. Change MAIL_HOST to smtp.mailgun.org in your .env file, considering that the .env file values are more priority.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search