Ulysses Stuff > Releases
ERS - EMail Reporting System
MrPresident:
okay..
Try removing the headers from the mail function entirely then.
--- Code: ---mail($to, $subject, $message);
--- End code ---
DarKevin:
--- Quote from: MrPresident on August 03, 2014, 02:42:00 PM ---okay..
Try removing the headers from the mail function entirely then.
--- Code: ---mail($to, $subject, $message);
--- End code ---
--- End quote ---
Tried that, no success :l
MrPresident:
I don't get it then. That removes all of the variables that make the script different from what you said worked.
Try one last thing. Replace the mail line with...
--- Code: ---mail("youremail@domain.com", "TEST SUBJECT", "TEST MESSAGE");
--- End code ---
Keep it inside of the report.php script though.
DarKevin:
Alright, gonna try that next.
Thanks for the support.
Edit: No luck here as well :(
As soon as I switched to the simple report.php (with my code from above) it started working again :l
I'll try to send a bigger test message and see if it gets "blocked" by my webspace host.
Edit2: When I do "too much", it's actually not sent (looks like max is 5kb, your report.php is ~2kb only, though)
On the other hand, it didn't work with the short
mail("youremail@domain.com", "TEST SUBJECT", "TEST MESSAGE");
as well. But there seems to be some filter going on.
I have another webhost to test, but I don't know if they have webmail.
Worth a try.
Edit3:
I tested it with the other webhost (000webhost.com)
The simple report.php (my code) works, the real code one doesn't, so it's the same thing :/
MrPresident:
I have an idea.. I don't see why, but maybe the CRC32 is different on different versions of php or on different hosts or something, so try this:
--- Code: ---<?php
$type = strip_tags($_POST["type"]);
$rplayer = strip_tags($_POST["rplayer"]);
$oplayer = strip_tags($_POST["oplayer"]);
$rtext = strip_tags($_POST["rtext"]);
$from = strip_tags($_POST["from"]);
$sip = strip_tags($_POST["sip"]);
$sport = strip_tags($_POST["sport"]);
$to = strip_tags($_POST["sendto"]);
$headers = "From: no-reply@g4p.org\r\n";
$headers .= "Reply-To: no-reply@g4p.org\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
if($type=="PLAYER REPORT")
{
$subject = 'Automated Player Report From: ' . $from;
$message = '<html><body>';
$message .= '<b><font color=\'#FF0000\'>Report Type:</font></b> ' . $type . '<br />';
$message .= '<b><font color=\'#FF0000\'>Reporting Player:</font></b> ' . $rplayer . '<br />';
$message .= '<b><font color=\'#FF0000\'>Reported Player:</font></b> ' . $oplayer . '<br />';
$message .= '<b><font color=\'#FF0000\'>Report Text:</font></b> ' . $rtext . '<br /><br /><br />';
$message .= '<i><a href=\'steam://connect/' . $sip . ':' . $sport . '\'>Click Here to join the server.</a></i>';
$message .= "</body></html>";
}
else
{
$subject = 'Automated Bug Report From: ' . $from;
$message = '<html><body>';
$message .= '<b><font color=\'#FF0000\'>Report Type:</font></b> ' . $type . '<br />';
$message .= '<b><font color=\'#FF0000\'>Reporting Player:</font></b> ' . $rplayer . '<br />';
$message .= '<b><font color=\'#FF0000\'>Report Text:</font></b> ' . $rtext . '<br /><br /><br />';
$message .= '<i><a href=\'steam://connect/' . $sip . ':' . $sport . '\'>Click Here to join the server.</a></i>';
$message .= "</body></html>";
}
mail($to, $subject, $message, $headers);
}
?>
--- End code ---
Try it first with all the headers. Just change the Reply-To and From fields in the code.
I appreciate you helping me figure this out. There are quite a few people with this same issue, but it works for me on my host, so it's hard to tell what the cause is.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version