Please help! Cannot send mail!

Status
Not open for further replies.

ellescuba27

Member
Messages
273
Reaction score
3
Points
18
Hello guys!
(Just going to confirm that there was absolutely nothing about this on status.x10hosting.com, because by the time I had the error, all the issues on the status website were marked "Completed")
OK, so I am sending mail with PHP from my site. I know the code is working because it was working a while ago, but now it doesn't. I am sending from my X10hosting email account, so forged header is off the list. I have not reached the mail limit, so cross that off the list too. In fact, whenever I send mail, I get Error 111. My conclusion would be that X10hosting thinks that I am sending from a forged header when I'm not, since the suggestion they give me on Live Chat was "Don't use forged headers". So I am guessing this is a server error. You see, the same thing happened a couple of weeks ago, and I kept getting Error 111, and then all of the sudden, it worked, and now since about 3 days ago, it doesn't work. So what's going on? Can you fix it?

BTW Happy Holidays!
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
If you could post the code you use (between CODE tags) it might help us find the problem.
 

ellescuba27

Member
Messages
273
Reaction score
3
Points
18
Thanks very much for the reply (and during the Holidays too)!!
Ok, here it is after being tweaked and tweaked again (blocked out email and password), I'm using PHPMailer:

PHP:
<?php
require_once("phpmailer/class.phpmailer.php");
$error = null;
function smtpmailer($to, $subject, $message, $winerror, $failerror) {
global $error;
$mail = new PHPMailer();
$mail->IsSMTP();
$mail->Username = "(blocked)";
$mail->Password = "(blocked)";
$mail->Host = "mail.(blocked)";
$mail->Port = 25;
$mail->SMTPAuth = true;
$mail->SetFrom("(blocked)", "The Educator");
$mail->AddAddress($to);
$mail->AddReplyTo("(blocked)", "The Educator");
$mail->Subject = $subject;
$mail->Body = $message;
$mail->SMTPDebug = 0;
if(!$mail->Send()) {
$error = true;
echo $failerror;
} else {
$error = false;
echo $winerror;
}
}
?>

And I call it from another page like this:
PHP:
require("themailingscript.php");
smtpmailer($_POST["email"], "The Educator", "This is the message I am sending you", "A message has been sent to $_POST[email].", "This just in, we could not send you a message. Your email was likely verified but the message could not be sent. This is likely a problem with our mail sending system, please come back later and the problem will probably be fixed.");

As well, I later found out I couldn't send mail with a regular email client either, meaning it's a server problem. :confused:
 
Status
Not open for further replies.
Top