title: How to configure Mail service in laravel 5.4 while email client is webmail?
body: <p>I have background of sending mail from SMTP driver. But currently I am working on a project where mail client is using webmail.DomainName.com (mail host starts with <strong>webmail</strong>) and website is hosted on Plesk Automation (web hosting Automation System like Cpanel). I can't send email from my own interface to other emails. actually this is my domain mail server which refuses sending mail.I already created a mail account I am using in .env file. But I don't know how to solve it and where I am doing wrong in my code. </p>
  
  <p>This is my mail configuration function code in my mail controller </p>
  
  <pre><code>  public function mailSender(Request $request)
  {
      $data = new EmailVarification();
      $data-&gt;email = $request['email'];
      $data-&gt;token = str_random(40);
      $data-&gt;save();
      $dataVar['token'] = $data-&gt;token;
      $dataVar['from'] = "MyEmail@MyDomain.com";
      $dataVar['email'] = "someOneEmail@SomeOneDomain.com";
      Mail::send('pages.registration.emailcon', $dataVar, function ($message) use ($dataVar) {
          $message-&gt;from($dataVar['from']);
          $message-&gt;to($dataVar['email']);
          $message-&gt;subject('Account Activation ');
      });
      return "saved";
  }
  </code></pre>
  
  <p>For fast configuration I am using .nev file for mail and I my configuration in .env mail section is:</p>
  
  <pre><code>BROADCAST_DRIVER=log
  MAIL_DRIVER=SMTP
  MAIL_HOST=webmail.MyDomain.com
  MAIL_PORT=587
  MAIL_USERNAME=MyEmail@MyDomain.com
  MAIL_PASSWORD=MyEmailPassword
  MAIL_ENCRYPTION=
  </code></pre>
  
  <p>While I am sending Email it gets me this error #screenshot
  <a href="https://i.stack.imgur.com/4A6xA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4A6xA.png" alt="enter image description here"></a> 
  As myself evaluation the problem is with part MAIL_DRIVER=SMTP in .env where webmail.MyDomain.com is not allowing or something else I don't know. </p>
  
  <p><a href="https://i.stack.imgur.com/4A6xA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4A6xA.png" alt="enter image description here"></a></p>