Website Membership: Slow Signup Emails

15 posts by 4 authors in: Forums > CMS Builder: Plugins & Add-ons
Last Post: March 26, 2012   (RSS)

By zip222 - May 10, 2011

I am using the membership plugin on a site and when a new user signs up there is usually, but not always, a long delay before they receive the email. It appears to be sending right away, but it doesn't arrive in their inbox until some time later - as much as an hour.

Is this a plugin issue, or a server issue? Any idea how to resolve it?

Re: [zip222] Website Membership: Slow Signup Emails

By Jason - May 10, 2011

Hi,

The membership plugin uses the php mail() function, which just passes the email to your mail server which queues up and send the emails.

You can contact your hosting provider and find out if there's anything that would delay your emails (ie, high traffic, daily limits, etc).

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/

Re: [Jason] Website Membership: Slow Signup Emails

By zip222 - May 10, 2011

Based on what I have found, the host only sends these emails once every 15 minutes, at most. Ugh.

Is there another way around this? Can I bypass the initial email with temporary password and just give the user immediate access to the site once they complete the signup form?

Re: [zip222] Website Membership: Slow Signup Emails

By Jason - May 10, 2011

Hi,

Probably the best way around this would be to allow them to set their own password instead of creating a temporary one for them. That way they'll only need to receive an email if they forget their password.

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/

Re: [Jason] Website Membership: Slow Signup Emails

By zip222 - May 13, 2011

Would you be able to give me a little guidance for doing this? The previous version of the plugin was setup this way by default, but the newer versions are not.

Re: [zip222] Website Membership: Slow Signup Emails

By Jason - May 13, 2011 - edited: May 13, 2011

Hi,

Sure. First, you'll have to customize the form to give them a place to type in their password. Normally you'll want them to type them in twice and compare them to make sure they're the same. For example:

<tr>
<td>Password</td>
<td><input type="password" name="password" value="<?php echo htmlspecialchars(@$_REQUEST['password']); ?>" size="50" /></td>
</tr>
<tr>
<td>Re-enter your password</td>
<td><input type="password" name="password2" value="<?php echo htmlspecialchars(@$_REQUEST['password2']); ?>" size="50" /></td>
</tr>


Then you'll want to add some error checking to ensure the two match:

// error checking
$errorsAndAlerts = "";
if (!@$_REQUEST['fullname']) { $errorsAndAlerts .= "You must enter your full name!<br/>\n"; }
if (!@$_REQUEST['password']) { $errorsAndAlerts .= "You must enter a password!<br/>\n"; }
elseif (@$_REQUEST['password'] != @$_REQUEST['password2']) { $errorsAndAlerts .= "Your passwords don't match! <br/>\n";}

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


Finally, you need to remove the code that produces the random password. Remove this line:

$_REQUEST['password'] = substr(md5(uniqid(rand(), true)), 15); // example output: c5560251ef0b3eef9

After that, you can remove the code that sends the email.

Hope this helps get you started.
---------------------------------------------------
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] Website Membership: Slow Signup Emails

By zip222 - May 13, 2011

Great. Thanks for your help.

Note, in case someone else tries to use this, there is a typo in the password error checking - need to remove the space in "password 2"

Re: [zip222] Website Membership: Slow Signup Emails

By Jason - May 13, 2011

Hi,

Good catch! :) I've edited the post to reflect that change.

Thanks
---------------------------------------------------
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: [zip222] Website Membership: Slow Signup Emails

By Jason - May 16, 2011

Hi,

Do you get logged out whenever you update your password, or only when you update your password and have information in your phone field?

Let me know,
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

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