7

first of all, sorry for my bad English =(

I created an HTML email, send it to yahoo, hotmail and gmail, the first and the second work's ok, received in the front of the inbox, but, the gmail mark as spam, but it will mark it as span only with I send these HTML codes:

                <tr>
                    <td colspan="2" style="padding:10px; border:2px solid #e3e3e3; text-align:center;"><a href="%%url%%" style="font-size:14px; text-decoration:none; color:#595959;"><span>Clique aqui e confira todas as informações e fotos dessa embarcação em nosso site - ID %%id%%</span></a></td>
                </tr>
                <tr>
                    <td colspan="2" style="padding:8px 10px; border-top:15px solid #fff; border-bottom:10px solid #fff; font-size:16px; text-transform:uppercase; color:#c90000; background:#e6e6e6;">Destaques YachtBrasil</td>
                </tr>
                <tr>
                    <td colspan="2" align="center" style="padding:3px; border:2px solid #e7e7e7;"><a href="http://www.yachtbrasil.com.br/"><span><img src="http://www.yachtbrasil.com.br/img/temp/YB-banner-email-site.jpg" alt="" style="display:block; border:none;" /></span></a></td>
                </tr>

It happens because of the anchor links, if I remove the stuff, it will work and send the email, the question is, How can I send anchor links to not be marked as Spam using gmail? I'm sending this email using a enterprise googlemail account.

Thanks for the tips, I search here and at google and just find the tip after the anchor link.

Best regards.

digoferra
  • 1,001
  • 3
  • 17
  • 33
  • 2
    This got nothing to do with programming and there's nothing you can do in code to "fix" this. You've already asked how to unflag your domain: http://serverfault.com/questions/221538/email-postfix-marked-as-spam-by-google so just follow the answers you got there. – Shadow The GPT Wizard Jan 20 '11 at 13:26
  • I changed, now I'm using googlemail to send via smtp, no more configuring server's, I get sad with that because I don't have a good understanding with DNS. The problem is, if I remove these lines I posted, the email get clear at the inbox. – digoferra Jan 20 '11 at 13:28

2 Answers2

5

The problem is fixed!

If you have an email with all the headers corrects, but the email still is not getting to inbox destination, you should explicitly type some anchor parameters, such as target=blank and shape=rect.

See the example:

<a href="link.html" target="_blank" style="style....">Test</a>

Should only contain:

<a href="link.html" target="_blank" shape="rect">Test</a>

This will let the links be redirected to the inbox and not the spam folder!

Thanks for the negative vote in the question, next time please read the question carefully and try to help!

cregox
  • 17,674
  • 15
  • 85
  • 116
digoferra
  • 1,001
  • 3
  • 17
  • 33
  • thanks for sharing above info but not working for me. I tried Create your password here but still emails goes to spam.Can you hel me in this? – Naren Verma Jan 06 '17 at 10:00
  • Create your password here – Naren Verma Jan 06 '17 at 10:58
  • This does not solve SPAM issue. According to my A-B testing when I included in the middle of body some HTML link - email was marked as SPAM. Does not matter that identical link used at the end of body was not causing problem. When I changed link to plain-text (not clickable) = INBOX. So I think it is very stupid way in this case how google decides what is and what is not SPAM. So always test your new email templates for gmail users before using in production. Google is unpredictable! – mikep Feb 18 '19 at 11:53
  • My answer is from 2017, currently, I'm using the confirmation policy and informed to google and Hotmail about at their consoles. I did not have any problems anymore sending HTML or any other elements. – digoferra Jun 14 '19 at 13:17
3

Don't send HTML through email!

E-mail is not meant to contain HTML (despite some conventions) and we, as developers, should avoid doing it. Always should have and still must have, because not all email clients support the standards.

So, we should give links, full URLs with no a href what so ever, at very least. Do not account the email reader will be able to read the HTML formatted email.

That being said...

HTML in email does have its place and usage

Because, granted, pure TEXT is way too poor. I personally think ideally all emails should refuse HTML and accept only some kind of MarkUp / MarkDown, but that may never happen even if Gmail or a few big ones would do it.

Also I couldn't even reproduce your "problem" on Gmail today (august 2013). Using a simple HTML email generator I could safely send <a href="link.html" target="_blank" style="style....">Test</a> into my own gmail inbox.

On an update note, there's now a much related question filled with good answers. Here are 3 links from there that can help you:

Community
  • 1
  • 1
cregox
  • 17,674
  • 15
  • 85
  • 116
  • Now I'e just got some new unjustified negative vote but, after reading again everything, I noticed I was being way too redundant and adding little information to the question. I believe now it's much better! ;) – cregox Oct 16 '15 at 10:04
  • 1
    I think the answer is fairly relevant. This is something every developer should know about (like [unicode](http://www.joelonsoftware.com/articles/Unicode.html)). I'd be furious when a HTML only email doesn't land in my spam. Thankfully, GMail does a very good job of detecting junk emails. – crodjer Oct 16 '15 at 10:26
  • I totally get the feeling @crodjer, thus my answer! :) But now I think Q&A format does not welcome too much redundancy inside the same answer. – cregox Oct 16 '15 at 10:46