SitePoint Sponsor

User Tag List

Results 1 to 10 of 10
  1. #1
    SitePoint Addict
    Join Date
    Mar 2009
    Posts
    268
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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:

    Code:
    <?php
    $message .='http://mywebsite.co.uk/verify.php?email='.$email.'&hash='.$hash.'' . "\r\n";
    ?>
    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?

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,219
    Mentioned
    457 Post(s)
    Tagged
    8 Thread(s)
    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?

  3. #3
    SitePoint Addict
    Join Date
    Mar 2009
    Posts
    268
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.

  4. #4
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,219
    Mentioned
    457 Post(s)
    Tagged
    8 Thread(s)
    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.

  5. #5
    SitePoint Addict
    Join Date
    Mar 2009
    Posts
    268
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.

  6. #6
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,219
    Mentioned
    457 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by freakystreak View Post
    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.

  7. #7
    SitePoint Addict
    Join Date
    Mar 2009
    Posts
    268
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.

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

  8. #8
    SitePoint Guru bronze trophy
    Join Date
    Dec 2003
    Location
    Poland
    Posts
    930
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    The link will be more correct if you encode special characters like this:
    PHP Code:
    $link .='http://mywebsite.co.uk/verify.php?email='.urlencode($email).'&hash='.$hash "\r\n"
    I'm not sure if this will have any effect on the spam filters but using urlencode is good practice anyway.

  9. #9
    SitePoint Addict
    Join Date
    Mar 2009
    Posts
    268
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks

  10. #10
    SitePoint Addict
    Join Date
    Mar 2009
    Posts
    268
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well still not working. Don't know what the best way to get around this issue, any suggestions would be great.


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •