HI All Plz help me for sending email from my company smtp server ,if i use gmail smtp with port no 465 it works properly but not with company smtp plzz help my mailer function is
function sendMailSmtp($email, $meaasge, $subject, $attachment='') {
$mail = new PHPMailer();
$body = $meaasge;
$mail->IsSMTP();
$mail->SMTPAuth = true;
$mail->SMTPSecure = "ssl";
$mail->Host = "smtp.a3spl.com";
$mail->Port =25;
$mail->Username = "xyz@a3spl.com";
$mail->Password = "xyzxyz";
$mail->From = "XYZ";
$mail->FromName = "XYZ";
$mail->Subject = $subject;
$mail->AltBody = "This is the body when user views in plain text format";
$mail->WordWrap = 50; // set word wrap
$mail->MsgHTML($body);
if(trim($attachment) != ''){
$mail->AddAttachment("uploadUserData/download/".$attachment);
}
$mail->AddAddress($email, "First Last"
;
$mail->IsHTML(true);
if (!$mail->Send()) {
echo "Mailer Error: " . $mail->ErrorInfo;
return FALSE;
} else {
return true;
}
}