Reply
error in sending mail
Old 11-02-2009, 08:18 AM error in sending mail
Junior Talker

Posts: 1
Name: pratibha patel
Trades: 0
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';
pratibha patel is offline
Reply With Quote
View Public Profile
 
 
When You Register, These Ads Go Away!
Old 11-02-2009, 08:21 AM Re: error in sending mail
Extreme Talker

Posts: 172
Trades: 0
You forgot to write what error message you get exactly
__________________
Daniel, Helpdesk Leader
Hosting24.com Web Hosting - First class web hosting services.
Reseller Hosting - Provide unlimited disk space and bandwidth!
Hosting24 is offline
Reply With Quote
View Public Profile
 
Old 11-02-2009, 09:37 PM Re: error in sending mail
alex021's Avatar
Skilled Talker

Posts: 97
Name: Alex
Trades: 0
try changing
$smtp_server="webmail.vvindore.com";
to
$smtp_server="localhost";
If your script is on the same server
alex021 is online now
Reply With Quote
View Public Profile
 
Reply     « Reply to error in sending mail
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 



Page generated in 0.12021 seconds with 13 queries