URL Validation link in email casusing spam filter hit

Hi guys,

I’m trying to get an email validation script working for registrations to my current project. What appears to be happening is that when I use a URL to an external web address it triggers the spam filter and will not deliver the email. My url looks like this:


<?php
$message .='http://mywebsite.co.uk/verify.php?email='.$email.'&hash='.$hash.'' . "\\r\
";
?>

I really want to keep the validation part in there so is there a way or format to allow it past the filter or is there another way to validate a user’s email?

Could you say a bit more about how this process happens? Are you just trying to check that a user-submitted email address is a valid one?

Ok, will try to explain. What basically happens is a user registers with the website and their details are added to a database but their account is not active using a simple 0 = unactive, 1 = active column. Within the confirmation email which the user receives is a link, containing a unique hash, that they have to click or visit. This then goes to a verfication process that checks the hash with the user’s details and if they match, active is set to ‘1’ and the account is ready to use.

The link I’m using is causing the spam filter to trigger so I’m just wondering if there’s any way to get around this and still have the link in the user’s confirmation email. Sorry I’m at work at the moment and don’t have access to my computer to post any more code but I’ll check at home this evening to see if anyone needs to see more to help.

I doubt the URL link is really the issue. What makes you think that’s the problem? (It won’t be PHP once it gets to the email client.) What’s the email’s title? And you can help email clients by adding SPF records etc. to your site.

I’ve tried sending the email without the link and it works, add the link back in and it doesn’t send. My title is ‘Registration | Verfication’. I also used bitl to reduce the link and the email worked so I presumed it was the php parts in the url that were causing the problem.

Presumably the PHP is stripped out before the email gets to the client? There should just be a normal link in the email, but no PHP code.

What I think I will do is something like this and see if it works. I do have a the user’s username and password included in the email and they are php variables. Don’t know what the difference is but just trying anything.


<?php
$link .='http://mywebsite.co.uk/verify.php?email='.$email.'&hash='.$hash.'' . "\\r\
";
$message .= $link . "\\r\
";
?>

The link will be more correct if you encode special characters like this:


$link .='http://mywebsite.co.uk/verify.php?email='.urlencode($email).'&hash='.$hash . "\\r\
";

I’m not sure if this will have any effect on the spam filters but using urlencode is good practice anyway.

thanks

Well still not working. Don’t know what the best way to get around this issue, any suggestions would be great.