Tenho um formulario para enviar emails.
Na versão SC6, funcionava beleza! Mas, na versão SC7, está dando erro. O erro não é no formulário e sim ao enviar o email, segue a mensagem abaixo:
Fatal error: Uncaught exception ‘Swift_TransportException’ with message ‘Connection could not be established with host smtp.gmail.com [A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. #10060]’ in C:\Program Files (x86)\NetMake\v7\wwwroot\scriptcase\prod\third\swift\classes\Swift\Transport\StreamBuffer.php:265 Stack trace: #0 C:\Program Files (x86)\NetMake\v7\wwwroot\scriptcase\prod\third\swift\classes\Swift\Transport\StreamBuffer.php(66): Swift_Transport_StreamBuffer->_establishSocketConnection() #1 C:\Program Files (x86)\NetMake\v7\wwwroot\scriptcase\prod\third\swift\classes\Swift\Transport\AbstractSmtpTransport.php(117): Swift_Transport_StreamBuffer->initialize(Array) #2 C:\Program Files (x86)\NetMake\v7\wwwroot\scriptcase\prod\third\swift\classes\Swift\Mailer.php(79): Swift_Transport_AbstractSmtpTransport->start() #3 C:\Program Files (x86)\NetMake\v7\wwwroot\scriptcase\app\samples1\mc in C:\Program Files (x86)\NetMake\v7\wwwroot\scriptcase\prod\third\swift\classes\Swift\Transport\StreamBuffer.php on line 265
Este e’ o codigo que estou utilizando.
[i]
// Email parameters
/*
$mail_smtp_server = ‘smtp.mail.yahoo.com.br’; // SMTP server name or IP address
$mail_smtp_user = ‘slblite’; // SMTP user name
$mail_smtp_pass = ‘???’; // SMTP password *a senha e’ outra…
$mail_porta = ‘587’;
$mail_from = ‘slblite@yahoo.com.br’; // From email
*/
$mail_to = [to_email];
$mail_subject = ‘Relatorio de Remessas ---- (’.$dt_aux.’)’; // Message subject
$mail_message = $out2.’
’.‘Total geral … ‘.
[t_total].’
’.$c_msg;
$mail_format = ‘H’; // Message format: (T)ext or (H)tml
sc_mail_send($mail_smtp_server,
$mail_smtp_user,
$mail_smtp_pass,
$mail_from,
$mail_to,
$mail_subject,
$mail_message,
$mail_format,’’,’’,$mail_porta);
if ({sc_mail_ok})
{
echo “Enviados {sc_mail_count} e-mail com sucesso !!”;
}
else
{
sc_erro_mensagem({sc_mail_erro});
}
[/i]
Não sei o que fazer…
alguem pode ajudar?