+ Reply to Thread
Results 1 to 9 of 9

Thread: PHP Mail()

  1. #1
    your_death_1994's Avatar
    your_death_1994 is offline x10Hosting Member your_death_1994 is an unknown quantity at this point
    Join Date
    Feb 2011
    Location
    Canada
    Posts
    21

    PHP Mail()

    Hey, I was wondering if you guys could help me out here. I was having an error with a php mail() function. I am using this function to send emails after a user registers for my site.

    Here is the PHP code:

    PHP Code:
    $Subject="Welcome to Pokemon Evolution!";
    $Message="
    Hey "
    .$Username.",\r\n
            Welcome to Pokemon Evolution.
            I\'m glad to see you join our community.
            This is an activation email, to activate your new account.
            Before you activate your account, here is your login information: 

                    User ID: <b>"
    .mysql_insert_id()."</b>
                    Username: "
    .$Username."
                    Password: "
    .$Password."

            To activate your account, follow the 2 step guide provided below.
            (or copy/paste it on your browser\'s address bar).

            Step 1: Go to the link provided below.
            http://pokemonevolution.x10.mx/activate.php

            Step 2: Enter your Activation Key and Activation ID:
                    
                    Activation ID: "
    .$ActivationID."
                    Activation Key: "
    .$ActivationKey."

            Note: Please do not send a reply message, it is an automated message!"
    ;

    $header="From: Raazi <raazi@pokemonevolution.x10.mx>\r\n";

    if (
    mail($Email$Subjectstripslashes($Message), $header)){

        echo 
    "An activation e-mail has been sent to ".$Email."! <br>";

    } else {

        echo 
    "Error sending an activation email.<br>";


    Yes, all the variables were defined earlier in the PHP code.

    I actually tested this registration out. It worked I got the, "An activation email ..." output, but I haven't received an email. Also to let you know, I have waited for over 24 hours, and checked my junk mail.

    Oh yes, I did receive an email when I sent it to my Chopin email address, (The email used to send the message).
    Example: raazi@pokemonevolution.x10.mx

    But got nothing when i sent it to my hotmail account.

    Thank you, for taking the time to read.
    Last edited by your_death_1994; 09-27-2011 at 10:32 PM. Reason: Punctuation
    Hey, I'm Razzi!

  2. #2
    theone48's Avatar
    theone48 is offline x10 Sophmore theone48 is an unknown quantity at this point
    Join Date
    Jun 2011
    Posts
    221

    Re: PHP Mail()

    Wish I could help you on this, but alas, my programming skills leave much to be desired. Perhaps someone else can assist you on this. Good luck!
    T1 Need Help? Add me to your friend's list & message anytime!
    If you believe this a good post, please click the star icon below. Thanks!
    Remember, help is only a step away in the forums or on Live Chat.

  3. #3
    misson is offline x10 Spammer misson is a jewel in the rough
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,506

    Re: PHP Mail()

    When you say there's an error, are you getting an error message? Just because an e-mail doesn't show up doesn't mean there's an error. It could be being blocked by design, as some mail servers block e-mail from some X10 domains. To get a better idea of what's going wrong, try a mailer with greater functionality, such as the PEAR Mail package or PHPMailer, and see if you can have it report back what happens when the e-mail is sent.
    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.

  4. #4
    theone48's Avatar
    theone48 is offline x10 Sophmore theone48 is an unknown quantity at this point
    Join Date
    Jun 2011
    Posts
    221

    Re: PHP Mail()

    Oh, I see. we're talking about mailers.
    T1 Need Help? Add me to your friend's list & message anytime!
    If you believe this a good post, please click the star icon below. Thanks!
    Remember, help is only a step away in the forums or on Live Chat.

  5. #5
    misson is offline x10 Spammer misson is a jewel in the rough
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,506

    Re: PHP Mail()

    @theone48: not to be rude, but if you don't have anything to add, why are you posting?
    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.

  6. #6
    theone48's Avatar
    theone48 is offline x10 Sophmore theone48 is an unknown quantity at this point
    Join Date
    Jun 2011
    Posts
    221

    Re: PHP Mail()

    I thought he was talking about automatic email forms, you know the ones where you click a word and out pops a contact form.
    T1 Need Help? Add me to your friend's list & message anytime!
    If you believe this a good post, please click the star icon below. Thanks!
    Remember, help is only a step away in the forums or on Live Chat.

  7. #7
    your_death_1994's Avatar
    your_death_1994 is offline x10Hosting Member your_death_1994 is an unknown quantity at this point
    Join Date
    Feb 2011
    Location
    Canada
    Posts
    21

    Re: PHP Mail()

    Thank you for the replies.

    I'm trying out PHPMailer , and would like to know what an SMTP Server is. And what SMTP Server x10hosting uses.

    Edit: I've searched the forums and found out what an SMTP Server is and what my SMTP mail server is.

    But I'm getting an error, which is:

    SMTP Error: The following recipients failed: myemail@hotmail.com
    Last edited by your_death_1994; 09-28-2011 at 06:13 PM.
    Hey, I'm Razzi!

  8. #8
    misson is offline x10 Spammer misson is a jewel in the rough
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,506

    Re: PHP Mail()

    Set PHPMailer::$SMTPDebug to 1 or 2 to get debugging output (higher number means higher debug level means more messages).
    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.

  9. #9
    your_death_1994's Avatar
    your_death_1994 is offline x10Hosting Member your_death_1994 is an unknown quantity at this point
    Join Date
    Feb 2011
    Location
    Canada
    Posts
    21

    Re: PHP Mail()

    Hey, I'm not sure where to enter the debugging number, but i did change the

    public $SMTPDebug = false;
    into
    public $SMTPDebug = true;
    And got a huge message when I retried to run the PHP code. Here is the error message i got:

    SMTP -> get_lines(): $data was ""
    SMTP -> get_lines(): $str is "220-chopin.x10hosting.com ESMTP Exim 4.69 #1 Thu, 29 Sep 2011 16:14:09 -0500 "
    SMTP -> get_lines(): $data is "220-chopin.x10hosting.com ESMTP Exim 4.69 #1 Thu, 29 Sep 2011 16:14:09 -0500 "
    SMTP -> get_lines(): $data was "220-chopin.x10hosting.com ESMTP Exim 4.69 #1 Thu, 29 Sep 2011 16:14:09 -0500 "
    SMTP -> get_lines(): $str is "220-We do not authorize the use of this system to transport unsolicited, "
    SMTP -> get_lines(): $data is "220-chopin.x10hosting.com ESMTP Exim 4.69 #1 Thu, 29 Sep 2011 16:14:09 -0500 220-We do not authorize the use of this system to transport unsolicited, "
    SMTP -> get_lines(): $data was "220-chopin.x10hosting.com ESMTP Exim 4.69 #1 Thu, 29 Sep 2011 16:14:09 -0500 220-We do not authorize the use of this system to transport unsolicited, "
    SMTP -> get_lines(): $str is "220 and/or bulk e-mail. "
    SMTP -> get_lines(): $data is "220-chopin.x10hosting.com ESMTP Exim 4.69 #1 Thu, 29 Sep 2011 16:14:09 -0500 220-We do not authorize the use of this system to transport unsolicited, 220 and/or bulk e-mail. "
    SMTP -> FROM SERVER:220-chopin.x10hosting.com ESMTP Exim 4.69 #1 Thu, 29 Sep 2011 16:14:09 -0500 220-We do not authorize the use of this system to transport unsolicited, 220 and/or bulk e-mail.
    SMTP -> get_lines(): $data was ""
    SMTP -> get_lines(): $str is "250-chopin.x10hosting.com Hello chopin.x10hosting.com [69.175.104.34] "
    SMTP -> get_lines(): $data is "250-chopin.x10hosting.com Hello chopin.x10hosting.com [69.175.104.34] "
    SMTP -> get_lines(): $data was "250-chopin.x10hosting.com Hello chopin.x10hosting.com [69.175.104.34] "
    SMTP -> get_lines(): $str is "250-SIZE 52428800 "
    SMTP -> get_lines(): $data is "250-chopin.x10hosting.com Hello chopin.x10hosting.com [69.175.104.34] 250-SIZE 52428800 "
    SMTP -> get_lines(): $data was "250-chopin.x10hosting.com Hello chopin.x10hosting.com [69.175.104.34] 250-SIZE 52428800 "
    SMTP -> get_lines(): $str is "250-PIPELINING "
    SMTP -> get_lines(): $data is "250-chopin.x10hosting.com Hello chopin.x10hosting.com [69.175.104.34] 250-SIZE 52428800 250-PIPELINING "
    SMTP -> get_lines(): $data was "250-chopin.x10hosting.com Hello chopin.x10hosting.com [69.175.104.34] 250-SIZE 52428800 250-PIPELINING "
    SMTP -> get_lines(): $str is "250-AUTH PLAIN LOGIN "
    SMTP -> get_lines(): $data is "250-chopin.x10hosting.com Hello chopin.x10hosting.com [69.175.104.34] 250-SIZE 52428800 250-PIPELINING 250-AUTH PLAIN LOGIN "
    SMTP -> get_lines(): $data was "250-chopin.x10hosting.com Hello chopin.x10hosting.com [69.175.104.34] 250-SIZE 52428800 250-PIPELINING 250-AUTH PLAIN LOGIN "
    SMTP -> get_lines(): $str is "250-STARTTLS "
    SMTP -> get_lines(): $data is "250-chopin.x10hosting.com Hello chopin.x10hosting.com [69.175.104.34] 250-SIZE 52428800 250-PIPELINING 250-AUTH PLAIN LOGIN 250-STARTTLS "
    SMTP -> get_lines(): $data was "250-chopin.x10hosting.com Hello chopin.x10hosting.com [69.175.104.34] 250-SIZE 52428800 250-PIPELINING 250-AUTH PLAIN LOGIN 250-STARTTLS "
    SMTP -> get_lines(): $str is "250 HELP "
    SMTP -> get_lines(): $data is "250-chopin.x10hosting.com Hello chopin.x10hosting.com [69.175.104.34] 250-SIZE 52428800 250-PIPELINING 250-AUTH PLAIN LOGIN 250-STARTTLS 250 HELP "
    SMTP -> FROM SERVER: 250-chopin.x10hosting.com Hello chopin.x10hosting.com [69.175.104.34] 250-SIZE 52428800 250-PIPELINING 250-AUTH PLAIN LOGIN 250-STARTTLS 250 HELP
    SMTP -> get_lines(): $data was ""
    SMTP -> get_lines(): $str is "250 OK "
    SMTP -> get_lines(): $data is "250 OK "
    SMTP -> FROM SERVER:250 OK
    SMTP -> get_lines(): $data was ""
    SMTP -> get_lines(): $str is "550-chopin.x10hosting.com (pokemonevolution.x10.mx) [69.175.104.34] is "
    SMTP -> get_lines(): $data is "550-chopin.x10hosting.com (pokemonevolution.x10.mx) [69.175.104.34] is "
    SMTP -> get_lines(): $data was "550-chopin.x10hosting.com (pokemonevolution.x10.mx) [69.175.104.34] is "
    SMTP -> get_lines(): $str is "550-currently not permitted to relay through this server. Perhaps you have not "
    SMTP -> get_lines(): $data is "550-chopin.x10hosting.com (pokemonevolution.x10.mx) [69.175.104.34] is 550-currently not permitted to relay through this server. Perhaps you have not "
    SMTP -> get_lines(): $data was "550-chopin.x10hosting.com (pokemonevolution.x10.mx) [69.175.104.34] is 550-currently not permitted to relay through this server. Perhaps you have not "
    SMTP -> get_lines(): $str is "550-logged into the pop/imap server in the last 30 minutes or do not have SMTP "
    SMTP -> get_lines(): $data is "550-chopin.x10hosting.com (pokemonevolution.x10.mx) [69.175.104.34] is 550-currently not permitted to relay through this server. Perhaps you have not 550-logged into the pop/imap server in the last 30 minutes or do not have SMTP "
    SMTP -> get_lines(): $data was "550-chopin.x10hosting.com (pokemonevolution.x10.mx) [69.175.104.34] is 550-currently not permitted to relay through this server. Perhaps you have not 550-logged into the pop/imap server in the last 30 minutes or do not have SMTP "
    SMTP -> get_lines(): $str is "550 Authentication turned on in your email client. "
    SMTP -> get_lines(): $data is "550-chopin.x10hosting.com (pokemonevolution.x10.mx) [69.175.104.34] is 550-currently not permitted to relay through this server. Perhaps you have not 550-logged into the pop/imap server in the last 30 minutes or do not have SMTP 550 Authentication turned on in your email client. "
    SMTP -> FROM SERVER:550-chopin.x10hosting.com (pokemonevolution.x10.mx) [69.175.104.34] is 550-currently not permitted to relay through this server. Perhaps you have not 550-logged into the pop/imap server in the last 30 minutes or do not have SMTP 550 Authentication turned on in your email client.
    SMTP -> ERROR: RCPT not accepted from server: 550-chopin.x10hosting.com (pokemonevolution.x10.mx) [69.175.104.34] is 550-currently not permitted to relay through this server. Perhaps you have not 550-logged into the pop/imap server in the last 30 minutes or do not have SMTP 550 Authentication turned on in your email client.
    SMTP Error: The following recipients failed: myemail@hotmail.com
    Thanks again.
    Hey, I'm Razzi!

+ Reply to Thread

Similar Threads

  1. Replies: 0
    Last Post: 06-29-2011, 02:54 PM
  2. Replies: 1
    Last Post: 10-04-2010, 02:46 PM
  3. Replies: 0
    Last Post: 07-09-2010, 08:18 AM
  4. Replies: 1
    Last Post: 09-30-2009, 10:52 AM
  5. Replies: 3
    Last Post: 12-03-2007, 08:56 PM

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