DDSameera's avatar

Address in mailbox given [] does not comply with RFC 2822, 3.6.2.

This is regarding Laravel backup plugin of spatie https://spatie.be/docs/laravel-backup/v6/installation-and-setup

if backup fail, system should send email to user.

Please note: I test this in localhost environment. also i m using WAMP server for this .

When i run php artisan backup:run command , it gives the following error



Starting backup...
Backup failed because: Cannot create a dumper for db driver `mainDBB`. Use `mysql`, `pgsql`, `mongodb` or `sqlite`..

   Swift_RfcComplianceException 

  Address in mailbox given [] does not comply with RFC 2822, 3.6.2.

  at C:\wamp64\www\lms\vendor\swiftmailer\swiftmailer\lib\classes\Swift\Mime\Headers\MailboxHeader.php:355
    351▕      */
    352▕     private function assertValidAddress($address)
    353▕     {
    354▕         if (!$this->emailValidator->isValid($address, new RFCValidation())) {
  ➜ 355▕             throw new Swift_RfcComplianceException('Address in mailbox given ['.$address.'] does not comply with RFC 2822, 3.6.2.');
    356▕         }
    357▕     }
    358▕ }
    359▕

  1   C:\wamp64\www\lms\vendor\swiftmailer\swiftmailer\lib\classes\Swift\Mime\Headers\MailboxHeader.php:272
      Swift_Mime_Headers_MailboxHeader::assertValidAddress("")

  2   C:\wamp64\www\lms\vendor\swiftmailer\swiftmailer\lib\classes\Swift\Mime\Headers\MailboxHeader.php:117
      Swift_Mime_Headers_MailboxHeader::normalizeMailboxes(["LMS"])

0 likes
1 reply
DDSameera's avatar
DDSameera
OP
Best Answer
Level 3

Fixed it. Here is the solution.

I defined following values in .env file

[email protected]
MAIL_FROM_NAME="${APP_NAME}"

Please or to participate in this conversation.