Closed Thread
Results 1 to 2 of 2

Thread: using mail() from PHP script

  1. #1
    simonp9940 is offline x10Hosting Member simonp9940 is an unknown quantity at this point
    Join Date
    Mar 2011
    Posts
    3

    using mail() from PHP script

    should this work ? on a free hosting account ?
    Do I need to configure any thing ? Ive got a simple script which does not send email...



    <?php
    // The message
    $message = "Line 1\nLine 2\nLine 3";

    // In case any of our lines are larger than 70 characters, we should use wordwrap()
    $message = wordwrap($message, 70);
    // Send
    if (mail('srpsrp99@gmail.com', 'My Subject', $message)) {
    echo("<p>Message successfully sent!</p>");
    } else {
    echo("<p>Message delivery failed...</p>");
    }

    echo "Result: $result $message<br>\n";

    ?>


    PS. very new to this so go gentle ;-)

  2. #2
    Skizzerz's Avatar
    Skizzerz is offline Contributors Skizzerz will become famous soon enough
    Join Date
    Nov 2007
    Location
    Texas
    Posts
    2,153

    Re: using mail() from PHP script

    Hello,

    mail() should be enabled and working, although in my own tests it has not been sending so I will ask an admin to take a look at the servers.
    Ryan Schmidt | Level 2 Support
    █ 888-X10-9668 - ryan[@]x10hosting.com
    x10Hosting - Giving Away Hosting Since 2004
    Premium Hosting | VPS Services

Closed Thread

Similar Threads

  1. Help for php mail()l script
    By pierre39 in forum Programming Help
    Replies: 5
    Last Post: 01-02-2011, 10:10 AM
  2. php mail script
    By droctoganapus86 in forum Programming Help
    Replies: 8
    Last Post: 12-29-2010, 09:33 AM
  3. Mail using script
    By mrxp_anupam in forum Free Hosting
    Replies: 1
    Last Post: 10-19-2008, 09:18 AM
  4. foward mail to a php script
    By ruicos in forum Programming Help
    Replies: 3
    Last Post: 09-13-2008, 07:55 AM
  5. Send Mail Script
    By james3uk in forum Programming Help
    Replies: 3
    Last Post: 04-01-2008, 05:36 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