Membership Add-On Issue (NEED HELP ASAP)!

By (Deleted User) - June 30, 2010

I keep getting this error after every submission to the signup form:

Mail Error: mail(): SMTP server response: 451 See http://pobox.com/~djb/docs/smtplf.html.

Called GoDaddy for help and was told it was a form error and that there end was working the way it is suppost to.

So I did some online research and was told to replace the "\n" with "\r\n", and I did that and still am having issues with that error message coming up.

When someone submits the form, it will still store the information on the database BUT it never emails the client like it is suppost to.

I need a solution asap because we are suppost to open this section at our event on the 6th of July!

Hosting Notes:
Website www.loginugpa.com/signup.php
Hosting: Godaddy - Windows
Database: MYPHPADMIN/ MY SQL

THANKS IN ADVANCE!

Re: [theugpa] Membership Add-On Issue (NEED HELP ASAP)!

By (Deleted User) - July 1, 2010

Thanks for responding! I don't know about the code you show, I tried looking at your code but it is completely different than what I have. I will take a little deeper look into your code and compare my it with my code.

Here is the link to my signup page: www.ugpalogin.com/signup.php

I have not changed anything in the script other than the "\n" to "\r\n"

Any other help or solutions will be great as well!

Re: [theugpa] Membership Add-On Issue (NEED HELP ASAP)!

By Codee - July 16, 2010

Are you able to post the whole page code so it can be reviewed? (unless you've contacted one of the IT programmers directly on this already).

Re: [equinox69] Membership Add-On Issue (NEED HELP ASAP)!

By (Deleted User) - August 20, 2010

Okay I think the issue I am having is related to having a website being hosted on another website. What I mean by this is that www.ugpalogin.com is really being hosted on www.theugpa.com. I am using Godaddy Windows hosting as well. I think the issue is that it isn't reading the FTP correctly. I don't know if this helps at all but it would be nice to get this running correctly. Currently I am having to manually add new clients, which is very time consuming. Please help!

This is the error code received when someone submits the signup form: SMTP server response: 451

In addition, the client never receives an email, however, the request for an account is available on the admin section.

Here is the entire script:


<?php require_once "cmsAdmin/lib/viewer_functions.php"; ?>
<?php if (!@$GLOBALS['WEBSITE_MEMBERSHIP_PLUGIN']) { die("You must activate the Website Membership plugin before you can access this page."); } ?>
<?php

$showSignupForm = true;

// error checking
if (@$CURRENT_USER) {
$errorsAndAlerts = "You are already signed up! <a href='{$GLOBALS['WEBSITE_LOGIN_POST_LOGIN_URL']}'>Click here to continue</a>.";
$showSignupForm = false;
}

// process form
if (@$_REQUEST['save']) {

// error checking
$errorsAndAlerts = "";
if (!@$_REQUEST['fullname']) { $errorsAndAlerts .= "You must enter your full name!<br/>\r\n"; }
if (!@$_REQUEST['email']) { $errorsAndAlerts .= "You must enter your email!<br/>\r\n"; }
else if(!isValidEmail(@$_REQUEST['email'])) { $errorsAndAlerts .= "Please enter a valid email (example: user@example.com)<br/>\r\n"; }
if (!@$_REQUEST['username']) { $errorsAndAlerts .= "You must choose a username!<br/>\r\n"; }

// check for duplicate usernames and emails
if (!$errorsAndAlerts) {
$count = mysql_select_count_from('accounts', "`username` = '".mysql_escape(@$_REQUEST['username'])."'");
if ($count > 0 && @$_REQUEST['username']) { $errorsAndAlerts .= "That username is already in use, please choose another!<br/>\r\n"; }

$count = mysql_select_count_from('accounts', "'".mysql_escape($_REQUEST['email'])."' IN (email, username)");
if ($count > 0) { $errorsAndAlerts .= "That email is already in use, please choose another!<br/>\r\n"; }
}

// turn off strict mysql error checking for: STRICT_ALL_TABLES
mysqlStrictMode(false); // disable Mysql strict errors for when a field isn't defined below (can be caused when fields are added later)

// add user
if (!$errorsAndAlerts) {
$_REQUEST['password'] = substr(md5(uniqid(rand(), true)), 15); // example output: c5560251ef0b3eef9

mysql_query("INSERT INTO `{$TABLE_PREFIX}accounts` SET
fullname = '".mysql_escape( $_REQUEST['fullname'] )."',
email = '".mysql_escape( $_REQUEST['email'] )."',
username = '".mysql_escape( $_REQUEST['username'] )."',
password = '".mysql_escape( $_REQUEST['password'] )."',

disabled = '0',
isAdmin = '0',
expiresDate = '0000-00-00 00:00:00',
neverExpires = '1',
createdDate = NOW(),
updatedDate = NOW(),
createdByUserNum = '0',
updatedByUserNum = '0'")
or die("MySQL Error Creating Record:<br/>\r\n". htmlspecialchars(mysql_error()) . "\r\n");
$userNum = mysql_insert_id();

// create accesslist entry
// replace '_sample' with the table you want the user to access
// replace '6' with the access level they should have: 0=none, 6=author, 9=editor
// replace '1' with the max listings they are allowed
mysql_query("INSERT INTO `{$TABLE_PREFIX}_accesslist`
(userNum, tableName, accessLevel, maxRecords, randomSaveId)
VALUES ($userNum, 'all', '1', NULL, '1234567890'),
($userNum, '_sample', '6', 1, '1234567890'),
($userNum, '_sample', '6', 1, '1234567890'),
($userNum, '_sample', '6', 1, '1234567890')") or die("MySQL Error Creating Access List:<br/>\r\n". htmlspecialchars(mysql_error()) . "\r\n");

//
_websiteLogin_sendSignupMessage();
$errorsAndAlerts = "Thanks, We've created an account for you and emailed you your password.<br/><br/>\r\n";
$errorsAndAlerts .= "If you don't receive an email from us within a few minutes check your spam filter for messages from {$SETTINGS['adminEmail']}<br/><br/>\r\n";
$errorsAndAlerts .= "<a href='{$GLOBALS['WEBSITE_LOGIN_LOGIN_FORM_URL']}'>Click here to login</a>.";

$_REQUEST = array(); // clear form values
$showSignupForm = false;
}
}

?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<style type="text/css">
body, td { font-family: arial; font-size: 14px; }
</style>
</head>
<body>

<h1>UGPA Account Signup Form</h1>

<!-- USER SIGNUP FORM -->
<?php if (@$errorsAndAlerts): ?>
<div style="color: #C00; font-weight: bold; font-size: 14px; font-family: arial;"><br/>
<?php echo $errorsAndAlerts; ?><br/>
</div>
<?php endif ?>

<?php if ($showSignupForm): ?>
<form method="post" action="?">
<input type="hidden" name="save" value="1" />

<table border="0" cellspacing="0" cellpadding="2">
<tr>
<td>Full Name</td>
<td><input type="text" name="fullname" value="<?php echo htmlspecialchars(@$_REQUEST['fullname']); ?>" size="50" /></td>
</tr>
<tr>
<td>Email</td>
<td><input type="text" name="email" value="<?php echo htmlspecialchars(@$_REQUEST['email']); ?>" size="50" /></td>
</tr>
<tr>
<td>Username</td>
<td><input type="text" name="username" value="<?php echo htmlspecialchars(@$_REQUEST['username']); ?>" size="50" /></td>
</tr>

<tr>
<td colspan="2" align="center">
<br/><input class="button" type="submit" name="submit" value="Sign up &gt;&gt;" />
</td>
</tr>
</table>

</form>
<?php endif ?>
<!-- /USER SIGNUP FORM -->

</body>
</html>

Re: [theugpa] Membership Add-On Issue (NEED HELP ASAP)!

By Jason - August 23, 2010

Hi,

I see in your code that you're entering values into the database before you send the message. Are you still having to add clients manually? Are the values you're entering not making it into the database?

Since it's an SMTP error, it has to be occurring on the server. A 451 error means that one of the servers that the message is passing through is dropping the message. It's unclear as to which server is dropping it, it could be your hosting server, the ISP, or even the destination server. If you try signing up yourself, do you get the email, or do you get an error?

Let me know and we can look into this further.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] Membership Add-On Issue (NEED HELP ASAP)!

By (Deleted User) - August 24, 2010

I still have to manually add new clients. When a client uses the membership form, the data goes through onto the database but the client receives an error message and a email is never sent to them. I have attached 3 photos to show what the form does. The first one is just a picture of the form and some fake data. The second photo is what the client views after clicking the submit button. The third photo is a picture of the User Accounts section in the admin area.

I have tried multiple computers on different ISPs, all of which were unsuccessful.
Attachments:

partone.jpg 181K

parttwo.jpg 171K

partthree.jpg 322K

Re: [theugpa] Membership Add-On Issue (NEED HELP ASAP)!

By Jason - August 24, 2010

Hi,

The information is getting into your database, so the only issue is the email being sent. This is a server side issue. I would contact your hosting provider again and ask them to look at your SMTP settings since you're not able to use the php mail() function.

Hope this helps.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/