title: Expected response code 354 but got code "503"
body: <p>I am trying to create a Contact Us Form in a Laravel Project but ran into the following error and would like to know how to solve this.</p>
  
  <blockquote>
    <p>Expected response code 354 but got code "503", with message "503-All RCPT commands were rejected with this error: 503-"Your IP: 202.133.88.147 : Your domain gmail.com is not allowed in header 503-From" 503 Valid RCPT command must precede DATA "</p>
  </blockquote>
  
  <p>The following is my <strong>.ENV</strong> file</p>
  
  <pre><code>MAIL_DRIVER=smtp
  MAIL_HOST=mail.mydomain.com
  MAIL_PORT=26
  MAIL_USERNAME=support@mydomain.com
  MAIL_PASSWORD=mypassword
  MAIL_ENCRYPTION=null
  </code></pre>
  
  <p><strong>Controller</strong></p>
  
  <pre><code>  public function contactus()
      {
          return view('contactus');
      }
  
      public function sendContactMail(Request $request)
      {
          Mail::to('support@mydomain.com')-&gt;send(new ContactUs($request));
          Session::flash('success','Message Sent Successfully!');
          return redirect()-&gt;back();
      }
  </code></pre>
  
  <p><strong>ContactUs.php</strong></p>
  
  <pre><code>&lt;?php
  
  namespace App\Mail;
  
  use Illuminate\Bus\Queueable;
  use Illuminate\Mail\Mailable;
  use Illuminate\Queue\SerializesModels;
  use Illuminate\Contracts\Queue\ShouldQueue;
  
  class ContactUs extends Mailable
  {
      protected $contactdata;
      use Queueable, SerializesModels;
  
      /**
       * Create a new message instance.
       *
       * @return void
       */
      public function __construct(\Illuminate\Http\Request $request)
      {
          $this-&gt;contactdata = $request;
      }
  
      /**
       * Build the message.
       *
       * @return $this
       */
      public function build()
      {
          return $this-&gt;from($this-&gt;contactdata-&gt;email)
                      -&gt;subject($this-&gt;contactdata-&gt;subject)
                      -&gt;with([
                          'message'   =&gt;  $this-&gt;contactdata-&gt;message,
                          'fullname'  =&gt;  $this-&gt;contactdata-&gt;first_name.' '.$this-&gt;contactdata-&gt;last_name
                      ])
                      -&gt;markdown('emails.contactus');
      }
  }
  
  </code></pre>
  
  <p>Thanks in advance for the help.</p>