E-mails are not being sent

Status
Not open for further replies.

sfcpfc

New Member
Messages
3
Reaction score
0
Points
0
Hello. I just uploaded my projet to x10hosting, but when I try to send an e-mail, It doesn't arrive to my inbox. I'm using the php function mail().Here's my code, but I don't think it's a mistake from me, I think the mails server are not working correctly. Can you help me? Thanks in advance.
PHP:
<?php
include 'connect.php';
function send_mail($from,$to,$subject,$body)
{
	$headers = "Content-type: text/html; charset=ISO-8859-1\r\n";
	$headers .= "From: $from\n";
	$headers .= "Reply-to: $from\n";
	$headers .= "Return-Path: $from\n";
	$headers .= "Message-ID: <" . md5(uniqid(time())) . "@" . $_SERVER['SERVER_NAME'] . ">\n";
	$headers .= "MIME-Version: 1.0\n";
	$headers .= "Date: " . date('r', time()) . "\n";

	mail($to,$subject,$body,$headers);
}
function emailconfirmacion($usr){
	$resultado = mysql_query("SELECT * FROM usuarios WHERE usr = '".$usr."'");
	$fila = mysql_fetch_array($resultado, MYSQL_ASSOC);

	$codigo = md5(microtime());

	$email = file_get_contents('http://miniwars.tk/email.php?usr='.$usr.'&code='.$codigo);
	send_mail('admin@miniwars.tk',$fila['email'],'MiniWars - Confirma tu e-mail',$email);

	mysql_query("UPDATE usuarios SET codigo = '".$codigo."' WHERE usr = '".$usr."'");
}
emailconfirmacion('sfcpfc');
?>
 
Last edited:

spbcx10m

New Member
Messages
27
Reaction score
0
Points
1
After a quick look through I don't see anything immediately obvious in your code that would prevent it working. What server is your site on, and have you tried sending mail using webmail or an email client to prove the mail server is OK? I'm having a problem getting mail to send and receive on Level. The server doesn't appear to be accepting connections (from my account at least, so I'm wondering if anybody else is affected).

Peter
 

b.kehlmeier55

Member
Messages
46
Reaction score
0
Points
6
Emails are stuck for me too. Always the SMTP error from remote mail server after RCPT TO:: host 198.91.80.251 [198.91.80.251]: 451 4.3.0 Error: queue file write error everytime, and almost every other day it seems.

I am wondering if this a constant issue with x10 hosting or not. I am trying to wait it out to get more info and/or see if it improves, but I haven't had anyone reply in the forums on what the issue is or if it is a constant thing around here or not.
 

spbcx10m

New Member
Messages
27
Reaction score
0
Points
1
It's not a 'constant thing' as you say. I've had my email accounts and website set up and working for 4 or 5 months and the problem has only become apparent since yesterday. I thought at first something might have changed in my email client that was preventing me sending mail, but making some tests has shown the problem appears to be with the server, affecting received mail too.

Peter
 

b.kehlmeier55

Member
Messages
46
Reaction score
0
Points
6
Do I understand this correctly?

The absolut server is accepting my email request via SMTP, yet they are never getting delivered, and I don't receive any emails from the server telling me this is the status? How is this acceptable? Once the request is accepted, I thought it reasonable to expect the email to be delivered at some point. The server is firing off emails not, but ones sent yesterday morning never went out. I can see 4 or 5 attempts in the email trace, but then no activity after that.

Is this root cause of this issue known? It has occurred several times in the last week. It would be one thing for the server to turn down the request, but to accept it and then fail to hold its end of the bargain is just plain disturbing IMO.
 
Status
Not open for further replies.
Top