PHP mail code works on other hosts but no x10?

liammk

New Member
Messages
15
Reaction score
0
Points
0
I have made a script to send emails in PHP:


PHP:
<?php
$to = "XXX@bigpond.com";
$subject = "request";
 $body = $_GET["email"];
if (mail($to, $subject, $body)) {
 echo("<br/><br/>Message successfully sent!</p>");
 } else {
 echo("<br/><br/>Message delivery failed...</p>");
 }
 ?>

But when i load the page it says & i dont recive an email:


Message successfully sent!"); } else { echo("
Message delivery failed...
"); } ?>


where am i going wrong? The script works on other hosts...
 

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48

Note that the script has an injection vulnerability via the "email" input variable. An attacker can inject arbitrary headers.

Why's x10 make it so complex! Why can i just use the good old mail()

The script from the tutorial is simply using mail(). Half of the script displays a result page. There are other difficulties sending e-mail on X10 due to spammers abusing the servers.
 
Last edited:
Top