preventing gmail from stripping href, target, and id attributes

user3226932

I'm sending an email from my NodeJS server using Mailgun to a Gmail account, but Gmail strips all the attributes in the email. What is the reason for this and how do I prevent this from happening? I tried encoding the href value using encodeURIComponent but that did nothing for the href tag. I'm also not using any CSS or anything so I'm confused why this is happening.

before:

<a href="/resetpw" id="reset-link" id="reset" target="_blank">Reset Password</a>

after (when I checked the HTML of the email):

<a></a>
ceejayoz

Gmail is likely stripping your link from the email because of the href value of /resetpw, which, seeing as it's missing a domain name, will refer to https://mail.google.com/resetpw and a) not work and b) potentially be a security hole (I can't think of a way off-hand, but it makes sense to be overly cautious here on Google's part).

Use a valid URL with a scheme and domain/IP (i.e. http://localhost:3000/resetpw), fix the invalid HTML like duplicate id parameters, and it should work just fine.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Stripping time from datetime in Sort

From Dev

Prestashop get product attributes from its id

From Dev

Prevent addRule from stripping !important

From Dev

Stripping empty attributes from Laravel model before saving

From Dev

Stripping characters from a Bash variable

From Dev

Stripping substring from string in filepath

From Dev

simple_format is stripping out target _blank

From Dev

Ordering attributes in ASP.NET WebApi response models inheriting href and id from a base class

From Dev

Stripping Alpha Channel from Images

From Dev

Preventing scroll to top in href="#" links

From Dev

Stripping GPS coordinates from string

From Dev

Stripping superscript from plaintext

From Dev

Stripping integers from an array

From Dev

get id from a href and include in jquery

From Dev

How to get the href value and use it as the id of a target

From Dev

href adds symbols to link preventing it from opening

From Dev

Firebase stripping the "+" sign from my phonenumber id

From Dev

Preventing attributes update in model

From Dev

Based on a Href Value Highlight Row Matching ID from Href Link

From Dev

Preventing href in <a></a> from executing via Javascript

From Dev

jquery multiple links text replacement from id in target href page

From Dev

Gmail modifying a href link

From Dev

Stripping . from text box's

From Dev

xCode Stripping extended attributes failed / xattr

From Dev

Selenium how to extract href from attributes

From Dev

TinyMCE Editor is stripping out empty href attribute

From Dev

retrieve href attributes from url with php

From Dev

Bootstrap 4 tabs not working on iOS with "data-target" instead of "href" attributes

From Dev

Reactjs - retrieve attributes from event.target

Related Related

HotTag

Archive