Recent Topics

Verification Email Cannot send.

  • .env


    config > mail.php

    'host' => env('MAIL_HOST', ''),

    Inside Admin > Configure > Customer > Allow Email Verification -> 'YES'

    When I register new customer, flash message display like Account created successfully, but verification e-mail unsent and when I try to login then flash come again like verify your email account first

    What did I missed? or is not possible?

    I only tried in mailtrap

    Thanks in advance

  • Hi @valpuia

    If you are using the config:cache command during deployment, you must make sure that you are only calling the env function from within your configuration files, and not from anywhere else in your application.

    But for a quick fix this will do:

    php artisan config:clear

    But i used your mail configuration in my application, then given errors occur -

    Kindly check your configuration from mailtrap and you can use it.


  • @rahul You got error because I regenerate mailtrap credentials, however I did php artisan config:clear and php artisan config:cache but still cannot send email like below image

  • Hi @valpuia

    Only run - php artisan config:clear

    Then check.

  • @rahul I run php artisan config:clear only but still got the same issue.

  • Hi @valpuia

    Once clear the browser cache, then run above command then check.


  • @rahul
    When I click resend email verification then I got like below image

  • @rahul
    I clear the browser, then run config:clear but still got same issue. Any other Idea to send verification email?

  • Hi @valpuia

    Open your Customer package, in this package's mail folder, you can find a file called ' VerificationEmail.php'. Replace the below code there.

    namespace Webkul\Customer\Mail;
    use Illuminate\Bus\Queueable;
    use Illuminate\Mail\Mailable;
    use Illuminate\Queue\SerializesModels;
    use Illuminate\Contracts\Queue\ShouldQueue;
    use Config;
     * Verification Mail class
     * @author    Rahul Shukla <[email protected]>
     * @copyright 2018 Webkul Software Pvt Ltd (
    class VerificationEmail extends Mailable
        use Queueable, SerializesModels;
        public $verificationData;
        public function __construct($verificationData) {
            $this->verificationData = $verificationData;
         * Build the message.
         * @return \Illuminate\View\View
        public function build()
            return $this->to($this->verificationData['email'])
                ->view('shop::emails.customer.verification-email')->with('data', ['email' => $this->verificationData['email'], 'token' => $this->verificationData['token']]);


  • I can get email now, thanks @rahul

Log in to reply