I’m not able to use smpt...
Example:
include_once($modx->config['base_path'].'manager/includes/controls/class.phpmailer.php');
$mail = new PHPMailer();
$mail->IsSMTP(); // set mailer to use SMTP
$mail->Host = "smtp.mydomain.it"; // specify main and backup server
$mail->SMTPAuth = true; // turn on SMTP authentication
$mail->Username = "[email protected]";; // SMTP username
$mail->Password = "mypassword"; // SMTP password
$mail->From = "[email protected]"; //do NOT fake header.
$mail->FromName = "MailMan";
$mail->AddAddress("[email protected]");
$mail->AddReplyTo("[email protected]", "Support and Help"); //optional
$mail->Subject = "Just a Test";
$mail->Body = "Hello. I am testing PHP Mailer.";
if(!$mail->Send())
{
echo $mail->ErrorInfo;
}else{
echo "email was sent";
}
Modx (class.phpmailer.php) don’t realy use SMTP... Because if I put wrong data I recive a mail anyway...
Can anyone help me in writing the short code
Thanks