1

I'm sending an email using Laravel:

$userAndEmail = '"' . $user->name() . '" <' . $user->email . '>';
Mail::to($userAndEmail)->send(new UserCreated($user, $userUnencryptedPassword));

This is returning the following error message: Address in mailbox given ["Bob asdf" <rava@gmail.com>] does not comply with RFC 2822, 3.6.2.

This works if $userAndEmail is just an email address, such as rava@gmail.com. Any tips on what might be wrong?

Thanks

zundi
  • 2,361
  • 1
  • 28
  • 45
  • Take a look at this: http://stackoverflow.com/questions/15963755/swift-rfccomplianceexception-on-valid-email-address-works-in-windows-not-in-ubu It seems that the regular expressions check of PCRE version can be the problem. – Javier Núñez Oct 19 '16 at 09:02

0 Answers0