Ciao a tutti,
ho creato una routine esterna per inviare una mail tramite phpmailer
PHP Code:<?php
if(!defined('sugarEntry'))define('sugarEntry', true);
require_once("include/phpmailer/class.phpmailer.php");
$mailer = new PHPMailer();
$mailer->IsSMTP();
$mailer->SMTPAuth = true; // enable SMTP authentication
$mailer->SMTPSecure = "ssl";
$mailer->Host = 'smtp.gmail.com';
$mailer->Port = '465';
$mailer->SetLanguage('phpmailer.lang-it','include/phpmailer/language/');
$mailer->Username = 'mia_mail@gmail.com'; // Change this to your gmail adress
$mailer->Password = 'password'; // Change this to your gmail password
$mailer->From = 'mia_mail@gmail.com'; // This HAVE TO be your gmail adress
$mailer->FromName = 'Administrator'; // This is the from name in the email, you can put anything you like here
$mailer->Body = 'This is the main body of the email';
$mailer->Subject = 'This is the subject of the email';
//$mailer->AddAddress('dest_mail@gmail.com');
if(!$mailer->Send())
{
echo "Message was not sent<br/ >";
echo "Mailer Error: " . $mailer->ErrorInfo;
}
else
{
echo "Message has been sent";
}
?>
Il problema è che non riesco ad inviarle...
Mi esce fuori questo messaggio:
CGI Timeout
The specified CGI application exceeded the allowed time for processing. The server has deleted the process.
Come mai invece se faccio una campagna riesco ad inviarle? C'è qualche parametro non corretto?


LinkBack URL
About LinkBacks



Reply With Quote
Bookmarks