title: Laravel 5.7: On-Demand e-mail Notification via AWS SES treats my recipient e-mail as a sender e-mail and wants it to be verified address
body: <p>I want to send a simple <a href="https://laravel.com/docs/5.5/notifications#on-demand-notifications" rel="nofollow noreferrer">on-demand e-mail notification</a> in Laravel 5.7.</p>
  
  <p>I went to AWS SES and under Email Addresses I added <code>do-not-reply@foo</code> as a sender. Then I click on the verification link on <code>do-not-reply@foo</code> to confirm it.</p>
  
  <p><a href="https://i.stack.imgur.com/NarV2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NarV2.png" alt="enter image description here"></a></p>
  
  <p>I configured my <code>.env</code>:</p>
  
  <pre><code>MAIL_FROM_ADDRESS=do-not-reply@foo
  MAIL_FROM_NAME="Foo System"
  MAIL_DRIVER=smtp
  MAIL_HOST=email-smtp.us-west-2.amazonaws.com
  MAIL_PORT=587
  MAIL_USERNAME=xxx
  MAIL_PASSWORD=xxx
  MAIL_ENCRYPTION=tls
  </code></pre>
  
  <p>I took username and password from here:</p>
  
  <p><a href="https://i.stack.imgur.com/rFiLL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rFiLL.png" alt="enter image description here"></a></p>
  
  <p>I did <code>php artisan config:clear</code> and <code>php artisan cache:clear</code>.</p>
  
  <p>Now in terms of my PHP code I have:</p>
  
  <pre><code>$this-&gt;notificationClass = (new ReflectionClass($notificationClass))-&gt;getShortName();
  $this-&gt;notificationData = $notificationData;
  $this-&gt;notification
      -&gt;route('slack', config('logging.channels.slack.url')) // slack works great all the time
      -&gt;route('mail', 'my-inbox-address-123@gmail.com') // this is address where I want notification to be sent
      -&gt;notify(new $notificationClass(
          $this-&gt;getNotificationTitle(),
          $this-&gt;getNotificationContent()
      ));
  </code></pre>
  
  <p>And the content of <code>$notificationClass</code> is:</p>
  
  <pre><code>&lt;?php
  
  namespace App\Notifications\Sync;
  
  use Illuminate\Notifications\Messages\MailMessage;
  use Illuminate\Notifications\Messages\SlackMessage;
  
  class SyncSuccessfullyCompletedNotification extends AbstractBaseSyncNotification
  {
      public function toSlack()
      {
          return (new SlackMessage)
              -&gt;success()
              -&gt;content(sprintf('*Synchronization Successful*```%s```', $this-&gt;message));
      }
  
      public function toMail()
      {
          return (new MailMessage)
              -&gt;from(config('mail.from.address'), config('mail.from.name'))
              -&gt;subject($this-&gt;title)
              -&gt;view('mail.notifications.sync_successfully_completed_notification', [
                  'content' =&gt; sprintf('&lt;pre&gt;%s&lt;/pre&gt;', $this-&gt;message),
              ]);
      }
  }
  </code></pre>
  
  <p>So <code>my-inbox-address-123@gmail.com</code> is just my gmail company inbox. When I execute the artisan command responsible for doing something and sending this notification I get:</p>
  
  <blockquote>
    <p>Swift_TransportException  : Expected response code 250 but got code
    "554", with message "554 Message rejected: Email address is not
    verified. The following identities failed the check in region
    US-WEST-2: my-inbox-address-123@gmail.com "</p>
    
    <p>at
    /home/vagrant/Code/iosportal/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php:457
        453|             $this->eventDispatcher->dispatchEvent($evt, 'responseReceived');
        454|         }
        455|
        456|         if (!$valid) {</p>
    
    <blockquote>
      <p>457|             $this->throwException(new Swift_TransportException('Expected response code '.implode('/',
      $wanted).' but got code "'.$code.'", with message "'.$response.'"',
      $code));
          458|         }
          459|     }
          460|
          461|     /** Get an entire multi-line response using its sequence number */</p>
    </blockquote>
    
    <p>Exception trace:</p>
    
    <p>1   Swift_Transport_AbstractSmtpTransport::assertResponseCode("554
    Message rejected: Email address is not verified. The following
    identities failed the check in region US-WEST-2:
    my-inbox-address-123@gmail.com ")
          /home/vagrant/Code/iosportal/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php:341</p>
    
    <p>2   Swift_Transport_AbstractSmtpTransport::executeCommand(" . ", [])
          /home/vagrant/Code/iosportal/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php:305</p>
    
    <p>Please use the argument -v to see more details.</p>
  </blockquote>
  
  <p>Why? I don't get this. My sender is verified, why it wants to verify a recipient?</p>
  
  <p>Indeed when I send this message from verified account to the same verified account the email arrives correctly, but this is nonsense.</p>