|
i m trying to send mail using php
but i m getting error ....
my code is :-
$senderemail="info@xxxx.com";
$sendername="virtual voyage";
$receiveremail="xxx@gmail.com";
$receivername="xxx";
$smtp_username="info@xxxx.com";
$smtp_password="xxxxxxxx";
$smtp_server="webmail.vvindore.com";
$mail_subject="testing mail";
$mail_body="This mail is just for testing......";
require("PHPMailer/class.phpmailer.php");
$mail = new PHPMailer();
$mail->From = $senderemail;
$mail->FromName = $sendername;
$mail->AddAddress($receiveremail, $receivername);
// Fill in Username and Password for servers requiring authentication
$mail->Username = $smtp_username;
$mail->Password = $smtp_password;
// SMTP server name
$mail->Host = $smtp_server;
$mail->Mailer = "smtp";
$mail->Subject = $mail_subject;
$mail->Body = $mail_body;
if(!$mail->Send())
$results = 'Error message';
else
$results = 'Success message';
|