Pessoal, está dando o seguinte erro ao enviar email:
|Array to string conversion|
Use o print_r para mostrar o conteúdo do array e mostra o valor da variável $mail_to.
Array ( [0] => alemoyses@gmail.com )
Este é o código:
$mail_smtp_server = ‘smtp.uhserver.com’;
$mail_smtp_user = ‘no-reply@remetente.com.br’;
$mail_smtp_pass = ‘senha’;
$mail_from = ‘workout@kauffmann.eng.br’;
$mail_to = ‘alemoyses@gmail.com’;
$mail_subject = ‘Teste servidor UOL’;
$mail_message = ‘teste de email’;
$mail_format = ‘H’;
$mail_copies = ‘’;
$mail_tp_copies = ‘’;
$mail_port = ‘587’;
$mail_tp_connection = ‘N’;
// Send email";
sc_mail_send($mail_smtp_server,
$mail_smtp_user,
$mail_smtp_pass,
$mail_from,
$mail_to,
$mail_subject,
$mail_message,
$mail_format,
$mail_copies,
$mail_tp_copies,
$mail_port,
$mail_tp_connection);
if ({sc_mail_ok})
{
echo “”;
}
else
{
print_r({sc_mail_erro});
sc_error_message({sc_mail_erro});
}