“stream_socket_enable_crypto(): Peer certificate CN=`gains.nanosupercloud.com' did not match expected...












0















I'm working in mail in laravel. I've following configuration.



MAIL_DRIVER=smtp
MAIL_HOST=smtp.sendgrid.net
MAIL_PORT=587
MAIL_USERNAME=********
MAIL_PASSWORD=########
MAIL_ENCRYPTION=tls


I've already tried this one but not working



stream_socket_enable_crypto(): Peer certificate CN=`cs723.mojohost.com' did not match expected CN=`smtp.sendgrid.net'



And many more similar question but still i don't get the solution. I've following error:




ErrorException (E_WARNING)
stream_socket_enable_crypto(): Peer certificate CN=gains.nanosupercloud.com' did not match expected CN=smtp.sendgrid.net'




I don't know what i'm doing wrong. Here is the code used for email sending.



public function toMail($notifiable)
{
return (new MailMessage)
->from(Config::get('values.app_email'),Config::get('values.app_name'))
->subject('Successfully approved your Company')
->greeting(sprintf('Hello %s', $this->user->name))
->line('Your company has been approved successfully. Now, it will be visible to our website');
}


Any kind of suggestions are appreciated.



Note: Everything works perfectly in local server(ubantu 16.04)










share|improve this question



























    0















    I'm working in mail in laravel. I've following configuration.



    MAIL_DRIVER=smtp
    MAIL_HOST=smtp.sendgrid.net
    MAIL_PORT=587
    MAIL_USERNAME=********
    MAIL_PASSWORD=########
    MAIL_ENCRYPTION=tls


    I've already tried this one but not working



    stream_socket_enable_crypto(): Peer certificate CN=`cs723.mojohost.com' did not match expected CN=`smtp.sendgrid.net'



    And many more similar question but still i don't get the solution. I've following error:




    ErrorException (E_WARNING)
    stream_socket_enable_crypto(): Peer certificate CN=gains.nanosupercloud.com' did not match expected CN=smtp.sendgrid.net'




    I don't know what i'm doing wrong. Here is the code used for email sending.



    public function toMail($notifiable)
    {
    return (new MailMessage)
    ->from(Config::get('values.app_email'),Config::get('values.app_name'))
    ->subject('Successfully approved your Company')
    ->greeting(sprintf('Hello %s', $this->user->name))
    ->line('Your company has been approved successfully. Now, it will be visible to our website');
    }


    Any kind of suggestions are appreciated.



    Note: Everything works perfectly in local server(ubantu 16.04)










    share|improve this question

























      0












      0








      0








      I'm working in mail in laravel. I've following configuration.



      MAIL_DRIVER=smtp
      MAIL_HOST=smtp.sendgrid.net
      MAIL_PORT=587
      MAIL_USERNAME=********
      MAIL_PASSWORD=########
      MAIL_ENCRYPTION=tls


      I've already tried this one but not working



      stream_socket_enable_crypto(): Peer certificate CN=`cs723.mojohost.com' did not match expected CN=`smtp.sendgrid.net'



      And many more similar question but still i don't get the solution. I've following error:




      ErrorException (E_WARNING)
      stream_socket_enable_crypto(): Peer certificate CN=gains.nanosupercloud.com' did not match expected CN=smtp.sendgrid.net'




      I don't know what i'm doing wrong. Here is the code used for email sending.



      public function toMail($notifiable)
      {
      return (new MailMessage)
      ->from(Config::get('values.app_email'),Config::get('values.app_name'))
      ->subject('Successfully approved your Company')
      ->greeting(sprintf('Hello %s', $this->user->name))
      ->line('Your company has been approved successfully. Now, it will be visible to our website');
      }


      Any kind of suggestions are appreciated.



      Note: Everything works perfectly in local server(ubantu 16.04)










      share|improve this question














      I'm working in mail in laravel. I've following configuration.



      MAIL_DRIVER=smtp
      MAIL_HOST=smtp.sendgrid.net
      MAIL_PORT=587
      MAIL_USERNAME=********
      MAIL_PASSWORD=########
      MAIL_ENCRYPTION=tls


      I've already tried this one but not working



      stream_socket_enable_crypto(): Peer certificate CN=`cs723.mojohost.com' did not match expected CN=`smtp.sendgrid.net'



      And many more similar question but still i don't get the solution. I've following error:




      ErrorException (E_WARNING)
      stream_socket_enable_crypto(): Peer certificate CN=gains.nanosupercloud.com' did not match expected CN=smtp.sendgrid.net'




      I don't know what i'm doing wrong. Here is the code used for email sending.



      public function toMail($notifiable)
      {
      return (new MailMessage)
      ->from(Config::get('values.app_email'),Config::get('values.app_name'))
      ->subject('Successfully approved your Company')
      ->greeting(sprintf('Hello %s', $this->user->name))
      ->line('Your company has been approved successfully. Now, it will be visible to our website');
      }


      Any kind of suggestions are appreciated.



      Note: Everything works perfectly in local server(ubantu 16.04)







      php laravel email






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Dec 31 '18 at 6:23









      Sagar GautamSagar Gautam

      4,18131541




      4,18131541
























          1 Answer
          1






          active

          oldest

          votes


















          0














          The answer i am giving may look funny but i have same error while sending mail in the live server



          just change this



          MAIL_DRIVER=smtp



          to



          MAIL_DRIVER=sendmail


          I don't know the reason How the hell is this working but it works fine for me






          share|improve this answer
























          • I've tried this before but still gives some problem. Error is : proc_open() has been disabled for security reasons

            – Sagar Gautam
            Dec 31 '18 at 6:50











          • I think i may be blocked port of the website Please Contact Your Hosting Provider or Rise the support ticket to them` Can You Please Share the screen Shot of the error You are getting So that i may Help You

            – Manojkiran.A
            Dec 31 '18 at 7:00













          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53984265%2fstream-socket-enable-crypto-peer-certificate-cn-gains-nanosupercloud-com-d%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          The answer i am giving may look funny but i have same error while sending mail in the live server



          just change this



          MAIL_DRIVER=smtp



          to



          MAIL_DRIVER=sendmail


          I don't know the reason How the hell is this working but it works fine for me






          share|improve this answer
























          • I've tried this before but still gives some problem. Error is : proc_open() has been disabled for security reasons

            – Sagar Gautam
            Dec 31 '18 at 6:50











          • I think i may be blocked port of the website Please Contact Your Hosting Provider or Rise the support ticket to them` Can You Please Share the screen Shot of the error You are getting So that i may Help You

            – Manojkiran.A
            Dec 31 '18 at 7:00


















          0














          The answer i am giving may look funny but i have same error while sending mail in the live server



          just change this



          MAIL_DRIVER=smtp



          to



          MAIL_DRIVER=sendmail


          I don't know the reason How the hell is this working but it works fine for me






          share|improve this answer
























          • I've tried this before but still gives some problem. Error is : proc_open() has been disabled for security reasons

            – Sagar Gautam
            Dec 31 '18 at 6:50











          • I think i may be blocked port of the website Please Contact Your Hosting Provider or Rise the support ticket to them` Can You Please Share the screen Shot of the error You are getting So that i may Help You

            – Manojkiran.A
            Dec 31 '18 at 7:00
















          0












          0








          0







          The answer i am giving may look funny but i have same error while sending mail in the live server



          just change this



          MAIL_DRIVER=smtp



          to



          MAIL_DRIVER=sendmail


          I don't know the reason How the hell is this working but it works fine for me






          share|improve this answer













          The answer i am giving may look funny but i have same error while sending mail in the live server



          just change this



          MAIL_DRIVER=smtp



          to



          MAIL_DRIVER=sendmail


          I don't know the reason How the hell is this working but it works fine for me







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Dec 31 '18 at 6:45









          Manojkiran.AManojkiran.A

          32028




          32028













          • I've tried this before but still gives some problem. Error is : proc_open() has been disabled for security reasons

            – Sagar Gautam
            Dec 31 '18 at 6:50











          • I think i may be blocked port of the website Please Contact Your Hosting Provider or Rise the support ticket to them` Can You Please Share the screen Shot of the error You are getting So that i may Help You

            – Manojkiran.A
            Dec 31 '18 at 7:00





















          • I've tried this before but still gives some problem. Error is : proc_open() has been disabled for security reasons

            – Sagar Gautam
            Dec 31 '18 at 6:50











          • I think i may be blocked port of the website Please Contact Your Hosting Provider or Rise the support ticket to them` Can You Please Share the screen Shot of the error You are getting So that i may Help You

            – Manojkiran.A
            Dec 31 '18 at 7:00



















          I've tried this before but still gives some problem. Error is : proc_open() has been disabled for security reasons

          – Sagar Gautam
          Dec 31 '18 at 6:50





          I've tried this before but still gives some problem. Error is : proc_open() has been disabled for security reasons

          – Sagar Gautam
          Dec 31 '18 at 6:50













          I think i may be blocked port of the website Please Contact Your Hosting Provider or Rise the support ticket to them` Can You Please Share the screen Shot of the error You are getting So that i may Help You

          – Manojkiran.A
          Dec 31 '18 at 7:00







          I think i may be blocked port of the website Please Contact Your Hosting Provider or Rise the support ticket to them` Can You Please Share the screen Shot of the error You are getting So that i may Help You

          – Manojkiran.A
          Dec 31 '18 at 7:00




















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53984265%2fstream-socket-enable-crypto-peer-certificate-cn-gains-nanosupercloud-com-d%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Mossoró

          Error while reading .h5 file using the rhdf5 package in R

          Pushsharp Apns notification error: 'InvalidToken'