PHP Mail()

your_death_1994

New Member
Messages
21
Reaction score
1
Points
0
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:
$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, $Subject, stripslashes($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:

theone48

New Member
Messages
237
Reaction score
7
Points
0
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!
 

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
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.
 

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
@theone48: not to be rude, but if you don't have anything to add, why are you posting?
 

theone48

New Member
Messages
237
Reaction score
7
Points
0
I thought he was talking about automatic email forms, you know the ones where you click a word and out pops a contact form.
 

your_death_1994

New Member
Messages
21
Reaction score
1
Points
0
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:

your_death_1994

New Member
Messages
21
Reaction score
1
Points
0
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.
 
Top