+ Reply to Thread
Results 1 to 6 of 6

Thread: PHP mail code works on other hosts but no x10?

  1. #1
    liammk is offline x10Hosting Member liammk is an unknown quantity at this point
    Join Date
    Sep 2008
    Posts
    15

    PHP mail code works on other hosts but no x10?

    I have made a script to send emails in PHP:


    PHP Code:
    <?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...

  2. #2
    morpheus1234567 is offline x10Hosting Member morpheus1234567 is an unknown quantity at this point
    Join Date
    Dec 2009
    Posts
    1

    Re: PHP mail code works on other hosts but no x10?

    look at ;
    http://www.youtube.com/watch?v=QiNcD...eature=channel

    the code he gives you the link to will work on X10. Also has other good tuts as well for the form creation. You will need to adjust the script to suit your needs tho for the php.

  3. #3
    liammk is offline x10Hosting Member liammk is an unknown quantity at this point
    Join Date
    Sep 2008
    Posts
    15

    Re: PHP mail code works on other hosts but no x10?

    Quote Originally Posted by morpheus1234567 View Post
    look at ;
    http://www.youtube.com/watch?v=QiNcD...eature=channel

    the code he gives you the link to will work on X10. Also has other good tuts as well for the form creation. You will need to adjust the script to suit your needs tho for the php.
    Why's x10 make it so complex! Why can i just use the good old mail()

  4. #4
    misson is offline Community Advocate misson is a jewel in the rough
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,391

    Re: PHP mail code works on other hosts but no x10?

    Quote Originally Posted by morpheus1234567 View Post
    Note that the script has an injection vulnerability via the "email" input variable. An attacker can inject arbitrary headers.

    Quote Originally Posted by liammk View Post
    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 by misson; 03-11-2010 at 03:49 PM.
    Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's and Jon Skeet's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.
    Misson, not Mission.

  5. #5
    sikvxz's Avatar
    sikvxz is offline x10Hosting Member sikvxz is an unknown quantity at this point
    Join Date
    Mar 2010
    Posts
    5

    Re: PHP mail code works on other hosts but no x10?

    you want a good website for php scripts like "mail" well..http://www.w3schools.com has alot of great scripts...that is what i use when i get lost on a script..ill get the mail link. the link is http://w3schools.com/php/php_mail.asp let me know if you find this to be helpful

  6. #6
    misson is offline Community Advocate misson is a jewel in the rough
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,391

    Re: PHP mail code works on other hosts but no x10?

    Quote Originally Posted by sikvxz View Post
    you want a good website for php scripts like "mail" well..http://www.w3schools.com has alot of great scripts...
    I'm not sure about their mail script, but much of W3Schools is outdated or doesn't cover crucial information (such as security). See "PHP tutorial that is security-, accuracy- and maintainability-conscious?" for better suggestions.
    Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's and Jon Skeet's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.
    Misson, not Mission.

+ Reply to Thread

Similar Threads

  1. php mail() only works for certain emails
    By drf1229 in forum Free Hosting
    Replies: 1
    Last Post: 02-28-2010, 09:21 PM
  2. ad brite code doesnt works for my phpbb
    By balaji2u in forum Scripts & 3rd Party Apps
    Replies: 3
    Last Post: 10-14-2008, 12:36 AM
  3. Replies: 3
    Last Post: 10-30-2007, 09:10 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers