Alguem poderia me ajudar , por favor,
Fatal error: Uncaught Swift_RfcComplianceException: Address in mailbox given [1615victorsamuel@gmail.com;samuel1615samuel@gmail.com ] does not comply with RFC 2822, 3.6.2. in D:\InetPub\wwwroot\scriptcase\prod\third\swift\classes\Swift\Mime\Headers\MailboxHeader.php:348 Stack trace: #0 D:\InetPub\wwwroot\scriptcase\prod\third\swift\classes\Swift\Mime\Headers\MailboxHeader.php(263): Swift_Mime_Headers_MailboxHeader->assertValidAddress(‘1615victorsamue…’) #1 D:\InetPub\wwwroot\scriptcase\prod\third\swift\classes\Swift\Mime\Headers\MailboxHeader.php(106): Swift_Mime_Headers_MailboxHeader->normalizeMailboxes(Array) #2 D:\InetPub\wwwroot\scriptcase\prod\third\swift\classes\Swift\Mime\Headers\MailboxHeader.php(63): Swift_Mime_Headers_MailboxHeader->setNameAddresses(Array) #3 D:\InetPub\wwwroot\scriptcase\prod\third\swift\classes\Swift\Mime\SimpleHeaderFactory.php(58): Swift_Mime_Headers_MailboxHeader->setFieldBodyModel(Array) #4 D:\InetPub\wwwroot\scriptcase\prod\third\swift\classes\Swift\Mime\SimpleHeaderSet.php(68): Swift in D:\InetPub\wwwroot\scriptcase\prod\third\swift\classes\Swift\Mime\Headers\MailboxHeader.php on line 348
meu codigo
{api_type}='smtp';
$smtp_server = “mail.email_serve”;
$smtp_port = “port”;
$smtp_user = “email@user.com”;
$smtp_password = “senha”;
$from_email = “email@user.com”;
$from_name = “name_Contato”;
$msg = “{conteudo}”;
$to = “{to}”;
$subject = “{subject}”;
if ( {api_type} == ‘smtp’ ){
$var_config = array(
'profile' => 'name_api',
'settings' => [
'gateway' => 'smtp',
'smtp_server' => $smtp_server,
'smtp_port' => $smtp_port,
'smtp_user' => $smtp_user,
'smtp_password' => $smtp_password,
'from_email' => $from_email,
'from_name' => $from_name
],
'message' => [
'html' => $msg,
'text' => '',
'to' => $to,
//'attachments' => array('/var/www/arquivo.txt','/var/www/arquivo2.txt'),
'subject' => {subject}
]
);
}
sc_send_mail_api($var_config);