Link to home
Start Free TrialLog in
Avatar of SAM2009
SAM2009Flag for Canada

asked on

In html code how to make sure email is not appear as a link?

Hi,

I have set this msg:

User generated image
Code source:

<div style="background-color: #fff; padding: 1pt; font-size: 10pt; font-weight: bold; font-family: 'Arial'; text-align: center; color: #000; margin-bottom: 5px; border: 2pt solid #da291c;"><span style="color: #da291c;">Warning: </span>Please change your password! <br /> <span style="color: #da291c;">Reminder: </span>If you need help please contact helpdesk team: heldeskteam@mydomain</div>

I want to make sure email "heldeskteam@mydomain" stay as text and not  hyperlink.
Avatar of HainKurt
HainKurt
Flag of Canada image

it is text... not hyperlink...
but some browser may detect it and automatically make it link...
Avatar of SAM2009

ASKER

Ya I know that what happen:-) I thought there a trick to make it read as a text wherever we put.

I add that code in Exchange rule but email appears as a link :-(
ASKER CERTIFIED SOLUTION
Avatar of HainKurt
HainKurt
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of SAM2009

ASKER

You put email as an image in code?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You put email as an image in code?

why not, is it a problem?
Avatar of SAM2009

ASKER

No just I'm just curious:-)
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Chris Stanyon
The real question here is why would you want to do that - you're asking your users to contact the helpdesk, and then going out of your way to make it more difficult for them to do so - not really a good experience for your users !
Avatar of SAM2009

ASKER

This time with all  securities precautions in place we just want to avoid link in warning message.
OK - I'm guessing this is more about SpamBots than anything else, so you might want to consider an obfuscator instead. Basically, the email is dropped into your page using Javascript - this makes it much more difficult for bots too scrape it while allowing genuine users to click on it and send you an email in the manner they expect.

Check out http://www.email-obfuscator.com/ - you just type in your email address (optional link text) and then paste the code into your page instead of your link
Or just have people submit a form to another page that will process the form data and send you an email. On the form, either use a honey pot field or captcha and that will prevent spam.  On small sites, I find a honey pot field works 95% of the time and is easier for users than a captcha.

A honey pot field is simply a hidden field <input type="hidden" name="email">.  Regular users will not visually see this. But bots will submit data to it. Then on your processing page, simply check to see if the field is submitted. If it is, then do not process the data. If it is not submitted, then continue and email yourself the form data.

For small sites, you typically only get hacking attempts by bots looking for something easy. It is very rare to get a human trying to mess with you and that is why I think I have had good success with this method. So far only one time I have seen this exploited and when that happened we just added the captcha feature. 
@Chris
Basically, the email is dropped into your page using Javascript  
probably, js solution will not work, and will be blocked left and right...
leaving no email address... even if it work, probably, the app that they use, will convert that email address to link again, no matter how do you construct it...

@Hain - why do you think a JS solution won't work, or why your own JS would be blocked. Scraper bots generally won't run a page with JS like a user - they just scrape text, so it's a perfectly viable solution. Give it go - you might be pleasantly surprised :)
@Chris

I have a feeling that this is used in emails, un-standard browsers, maybe used in some applications that show html without js support etc...

not sure though...

Sometimes a question asked here is not really the actual issue and I feel that is the case here as Chris pointed out by asking why you are trying to obfuscate and, "....going out of your way to make it more difficult for them to do so - not really a good experience for your users ! ..."  

He asked that based on actual experience and I agree. Trying to answer the question as originally posted is not going to end up as an optimal experience for the user.  Mitigating spam is what you are really trying to do.  If working with a form is not something you want to do, and I do feel that an image of an email instead of a useful link is not a good experience, then having a good anti spam system in place is what is required.

Many hosting services come with a free email server or at least the ability to add one and you can typically add many free email accounts to these services. The problem with these types of services is spam. Even with some open source anti spam they get through and can be very hard to manage. If you are using one of those types of servers, you almost need to subscribe to a third party anti spam service that diverts email to their servers before sending to yours.  One example I used prior to 2006 was Postini, which is now incorporated into Google Workspace (formerly GSuite, formerly Google Apps for work).  

The day that Google opened up their service for free where you can use your own domain with gmail, I moved all accounts I managed hosting for off the email servers that came with hosting to Google and just about all my spam headaches went away.

That's the long way of saying you may be better off to just change email services if you are not already on Google Workspace or Microsoft365. Both have very good anti spam protection and you can get started for about $5 per month per user.

If you don't want to move all your email accounts to a paid service, then you can either create a subdomain or another domain just for support and add that with just one user. Or use a third party service for spam.  This solution may mean you pay a little extra but overall I think gives the best experience to users by still just allowing them to interact nativly with your email link and for yourself most spam will be blocked.


Avatar of SAM2009

ASKER

Thanks