Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

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
 
 
Register now for full access!
Old 11-02-2009, 08:21 AM Re: error in sending mail
Ultra Talker

Posts: 339
Trades: 0
You forgot to write what error message you get exactly
__________________
Daniel, Helpdesk Leader

Please login or register to view this content. Registration is FREE
- First class web hosting services.

Please login or register to view this content. Registration is FREE
- 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
Super Talker

Posts: 118
Name: Alex
Trades: 0
try changing
$smtp_server="webmail.vvindore.com";
to
$smtp_server="localhost";
If your script is on the same server
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
---
Please login or register to view this content. Registration is FREE
---
Please login or register to view this content. Registration is FREE
alex021 is offline
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.41424 seconds with 12 queries