It is currently Fri Mar 29, 2024 2:03 pm


All times are UTC


Forum rules


Please click here to view the forum rules



Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: SMTP/mail question
PostPosted: Fri Oct 27, 2006 9:11 am 
Noobie
Noobie

Joined: Thu Oct 19, 2006 9:49 am
Posts: 8
Location: Dubai, UAE
Hi,

I am hosting my domain using the Personal package Plan. I have an e-greeting section also hosted there. For users to be able to send cards, obviously we need the mail option. With the 'mail' function, I am able to do so, however, from the FAQ, I understand that either the 'From' or 'To' header need to have an email id from the hosted domain. My questions:

Question 1
If I use STMP, is this still required? However, when I try to use SMTP, I am getting the following error:
Message was not sent
Mailer Error: SMTP Error: Could not authenticate
I have used the following code:

$mail = new PHPMailer();

$mail->IsSMTP(); // send via SMTP
$mail->Host = "ws5.100ws.com"; // SMTP servers
$mail->Port = 25;
$mail->SMTPAuth = true; // turn on SMTP authentication
$mail->Username = "card-notify@jai-world.com"; // SMTP username
$mail->Password = "********"; // SMTP password

$mail->From = "from@test.com";
$mail->FromName = "Mailer";
$mail->AddAddress("test@test.com", "Test");
$mail->AddReplyTo("info@site.com","Information");

$mail->WordWrap = 50; // set word wrap
$mail->IsHTML(true); // send as HTML

$mail->Subject = "Here is the subject";
$mail->Body = "This is the <b>HTML body</b>";
$mail->AltBody = "This is the text-only body";

if(!$mail->Send())
{
echo "Message was not sent <p>";
echo "Mailer Error: " . $mail->ErrorInfo;
exit;
}


Is there anything wrong in here?

Question 2
Is there any way I can use both the From and To address the user provides? The from address I provide doesn't look nice. (When you sent e-cards from most of the greeting card sites, the from address is the actual address and not the site's email id).

Any help is greatly appreciated. :D
BTW... ur forum is great!!!!

Thanks
jai


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 27, 2006 11:08 am 
Moderator
Moderator

Joined: Thu Dec 15, 2005 2:59 pm
Posts: 681
Location: England
For the first question, I think its a username/password problem. For the second, you need to get the ID of the box where the user enters his/her email, lets say its "email" and then in the code you refer back to it in the from section. E.g: $mail->From = "$email";


Top
 Profile  
 
 Post subject: Thanks
PostPosted: Fri Oct 27, 2006 12:14 pm 
Noobie
Noobie

Joined: Thu Oct 19, 2006 9:49 am
Posts: 8
Location: Dubai, UAE
Hi Dale,

Thanks for the reply. Your faq had mentioned that either the 'From' or 'To' address should have a 100ws hosted domain. However, I did try the same and it seems the mail doesnt go (I dont get any error either). Could be blocked by your server. :?:

On your first answer, I dont think it is a username/password problem. I am able to send mails from Outlook using the same credentials. Am I supposed to use a different mail server for sending from the site?

(I use the mail server mentioned in the Control Panel)

Thanks
Jai


Top
 Profile  
 
 Post subject: No reply :(
PostPosted: Fri Oct 27, 2006 2:38 pm 
Noobie
Noobie

Joined: Thu Oct 19, 2006 9:49 am
Posts: 8
Location: Dubai, UAE
Any answers????? :cry:


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 28, 2006 5:44 am 
Support Team Member

Joined: Sat Feb 12, 2005 5:19 pm
Posts: 289
Please view this section of our forum. There you can find the correct php settings that you will need to use:

http://forum.100webspace.com/viewtopic.php?t=181


Top
 Profile  
 
 Post subject: :(
PostPosted: Sat Oct 28, 2006 5:58 am 
Noobie
Noobie

Joined: Thu Oct 19, 2006 9:49 am
Posts: 8
Location: Dubai, UAE
Thanks... In fact my query was based exactly on that post. It is mentioned there that

Quote:
2. You have entered an e-mail address which is not hosted on our servers. We require the one of either the 'FROM:' e-mail address or the 'TO:' e-mail address to be hosted on our servers. Only if one of them is hosted on our servers, you will be able to send e-mail successfully.


However, I want both FROM and TO address to be external emails. My question was 'is there any option for that'.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 28, 2006 12:06 pm 
Support Team Member

Joined: Sat Feb 12, 2005 5:19 pm
Posts: 289
I'm terribly sorry but there isn't such a option. The FROM e-mail needs to be from your hosting account here.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ]  Moderators: fhmagic, KJ, Moderators, Support Team

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
100WebSpace © 2011