3
I have a problem sending email using a server I created in a data center hired.
Email sending works locally normally, although SMTP is in a well-known hosting company (I saw that they allow 20 emails per day from international IP). I have tried using other email services and always works local.
$mail = new PHPMailer;
$mail->isSMTP();
$mail->Host = $host;
$mail->SMTPAuth = true;
$mail->Username = $user;
$mail->Password = $password;
$mail->Port = 587;
$mail->SMTPDebug = 2;
//$mail->SMTPSecure = 'tls';
$mail->From = $from_mail;
$mail->FromName = $from_name;
$mail->addAddress($to);
$mail->WordWrap = 50;
$mail->isHTML(true);
$mail->Subject = $subject;
$mail->Body = $message;
if(!$mail->send()) {
echo 'Message could not be sent.';
echo 'Mailer Error: ' . $mail->ErrorInfo;
exit;
}
Does anyone have any idea what it might be?
The return whenever I try to send on the remote server is
2014-01-19 17:04:52 smtp error: failed to connect to server: Connection timed out (110) SMTP connect() failed. Message could not be sent. Mailer Error: SMTP connect() failed.
@Victor and so on. This can be discussed here http://meta.answall.com/questions/o-que-fazer-com-questions-que-podem-lookingdevelopment-mas-se-revealing. and the fact that we don’t have Servefault doesn’t mean we should accept his questions. If you think we should, you can propose in http://meta.answall.com/questions/264/quais-assuntos-devem-fazer-parte-do-nosso-foco-on-topic
– Maniero