Expected response code 250 but got code “”, with message “”

前端 未结 6 1563
时光说笑
时光说笑 2020-12-06 04:17

I can send my emails in localhost flawlessly. but ever since I uploaded my program into a hosting site I get this error

Expected response code 250 bu

相关标签:
6条回答
  • 2020-12-06 04:56

    FWIW - I get this error when sending a email with an empty string in the to field.

    0 讨论(0)
  • 2020-12-06 05:00

    we solved this problem by clearing the Laravel's configuration cache

    php artisan config:clear

    0 讨论(0)
  • 2020-12-06 05:00

    I've a working laravel swiftmailer using google server. Here my steps:

    1. I visited the link https://www.google.com/settings/security/lesssecureapps and turned on less secure apps.
    2. I edited .env file as like below:

      MAIL_DRIVER=smtp

      MAIL_HOST=smtp.gmail.com

      MAIL_PORT=587

      MAIL_USERNAME=username //i.e. username@gmail.com

      MAIL_PASSWORD=password //Gmail accounts password

      MAIL_ENCRYPTION=ssl

    Edit username and password with your own.

    1. In my controller, I wrote the following code:

      $rawData = request::all();

      Mail::queue('program.meeting.emailInvite', $rawData, function($message) use ($rawData)

      {

      $message->from('info@echosofts.com', 'Echosofts')->to(array_map('trim', explode(',', $rawData['all_email_id'])))->subject($rawData['mail_title']);

      });

    Then email was working fine except the sender email ID was my google account (username@gmail.com) instead of info@echosofts.com.

    1. To overcome the sender email changing problem, I visited my google account and did the following:

    "Setting icon"-> Settings -> Accounts and Import->Send mail as->Add another email address your own.

    The following settings depends on your configuration.

        Email address: info@echosofts.com
        SMTP server: mail.echosofts.com
        Username: info@echosofts.com
        password:**********
        Port:25
    
    0 讨论(0)
  • 2020-12-06 05:06

    I ran through this error so many times for some reasons.

    When see this error,

    Expected response code 250 but got code “”, with message “”

    Please triple check your email password.

    Note : Test your credentals first on a phone app or log-in into the mail site. If pass, you may update in your .env file

    MAIL_DRIVER=smtp
    MAIL_HOST=smtp.mail.yahoo.com
    MAIL_PORT=465
    MAIL_USERNAME=dev.bheng@yahoo.com
    MAIL_PASSWORD=****
    

    If you know for sure that your password is correct.

    Check to make sure your Gmail or Yahoo Mail allow app log-in.

    Example

    Yahoo

    0 讨论(0)
  • 2020-12-06 05:10

    This one worked for me, 'if you are using GMAIL'

    1. Go to 'My Accounts'
    2. Go to 'Sign-in & security'
    3. Scroll down to 'Allow less secure apps'
    4. Switch #3 to ON

    After doing this and if you just recently set up your email configurations on laravel and still doesn't work, try running:

    php artisan config:cache
    
    0 讨论(0)
  • 2020-12-06 05:16

    looks like the smtp was blocked for hostinger free users.

    http://www.hostinger.ph/forum/news-and-announcements/229-email-service-updates-1.html

    0 讨论(0)
提交回复
热议问题