SMTP setting
Posted by: adilcareer (---.com)
Date: May 29, 2012 10:27AM

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"winking smiley;

$mail->IsHTML(true);

if (!$mail->Send()) {
echo "Mailer Error: " . $mail->ErrorInfo;
return FALSE;
} else {
return true;

}
}

Options: ReplyQuote
Re: SMTP setting
Posted by: RiggsFolly (---.ppp.as43234.net)
Date: May 29, 2012 10:47AM

What error are you getting????

Options: ReplyQuote
Re: SMTP setting
Posted by: adilcareer (---.com)
Date: May 29, 2012 11:25AM

SMTP Error: Could not connect to SMTP host.

plz reply soon

thanks

Options: ReplyQuote
Re: SMTP setting
Posted by: RiggsFolly (---.ppp.as43234.net)
Date: May 29, 2012 11:36AM

Well you need to check with your mail administrator for a full set of valid names and port numbers.

It looks a little odd that you are trying to do secure ssl connections on port 25?

Options: ReplyQuote


Sorry, only registered users may post in this forum.