SitePoint Sponsor |
|
User Tag List
Results 1 to 6 of 6
-
May 6, 2006, 05:01 #1
- Join Date
- Jul 2005
- Posts
- 16
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Problem emailing with PHPMAILER script
I've been trying to configure phpmailer script to send email after having submitted a form.
However, I keep getting this error message:
PHP Code:require("class.phpmailer.php");
$mail = new PHPMailer();
$mail->Mailer = "smtp";
$mail->IsSMTP(); // send via SMTP
$mail->Host = "smtp.myisp.com"; // SMTP servers
$mail->SMTPAuth = true; // turn on SMTP authentication
$mail->Username = "myispusername"; // SMTP username
$mail->Password = "myisppassword"; // SMTP password
$mail->From = "myemail@mydomain.com";
$mail->FromName = "My Name";
$mail->AddAddress($Email);
$mail->AddCC("myemail@mydomain.com");
$mail->WordWrap = 50; // set word wrap
$mail->IsHTML(false); // send as HTML
Any help would be great!
Thanks!
-
May 6, 2006, 09:11 #2
- Join Date
- Feb 2005
- Location
- Greece
- Posts
- 1,221
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
The error that you get is not the error it self, but the message that sais that it can't locate the error message (because you haven't upload the files with the errors)
Did you tried to use :
PHP Code:$mail->IsSendmail();
The above type don't require to have sendmail in your server, as php has a way to pretend it has (it is some php.ini settings that are used for that)
-
May 6, 2006, 17:56 #3
- Join Date
- Jul 2005
- Posts
- 16
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thanks for the suggestion Nikolas,
I've changed it to use sendmail instead and I don't get the error message now.
However, I still don't receive any email from the form.
I've had this problem with a few different scripts - everything seems to go ok except that no email ever arrives.
Any ideas? Anyone else have this problem?
thanks!
-
May 6, 2006, 18:05 #4
If you're on a dedicated server, make sure you allow "nobody" to send mail. You're prone to spamming alittle more, but this was the problem with a clients script.
-
May 6, 2006, 21:41 #5
- Join Date
- Jul 2005
- Posts
- 16
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
my site's on a shared server, don't know if it's a problem with the web host in that case?
-
May 6, 2006, 23:43 #6
- Join Date
- Jul 2005
- Posts
- 16
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
It looks like I've found the problem, ends up my web host disabled all the mail functions on the shared server I'm on (of course without notifying anyone else!!!)
thanks for all your help.
Bookmarks