[SOLVED] Mail with link not sent

A

Anonymous

Guest
Hi,

I have a virtual server running Ubuntu and I send mails via an email account from my webspace provider (using ssmtp). So far, I have successfully sent mails, but as soon as I include a link in the mail, it never arrives.

Code:
//message with link, not working
$message="<!DOCTYPE HTML><html>
        <head>
        <meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
        </head>
        <body>
        Dear $name,<br><br>thank you for creating a ****** Account. Please click the link below to confirm your email address.<br><br><a href='https://example.com/account/verifyemail/".$token."'>https://example.com/account/verifyemail/".$token."</a>
        </body>/html>";
    //message without link, working without any problem
    $message="<!DOCTYPE HTML><html>
        <head>
        <meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
        </head>
        <body>
        Dear $name,<br><br>thank you for creating a ****** Account. Please click the link below to confirm your email address.
        </body></html>";
    
    $headers = "Content-type:text/html;charset=UTF-8" . "\r\n";
    $headers .="From: Name <noreply@example.com>";
    mail($email,"(Subject)", $message,$headers);

It is probably some spam filter thing, but apparently it is possible to send emails with activation links - I just got one when I registered in this forum :D

So, how do I fix this?

- Magogan

EDIT: The problem just disappeared, apparently it was the spam filter of my email provider.
 
Back
Top