How do I stop Outlook from rendering an email address as a mailto: link?

前端 未结 12 1237
生来不讨喜
生来不讨喜 2021-01-01 13:33

I am creating an HTML email to be sent to a user. If there is a valid email address to within an HTML email, Outlook will render it (normally helpfully) as a mailto: link.

相关标签:
12条回答
  • 2021-01-01 13:47

    There is no way to do this. Outlook uses a text parser to look at the incoming email and if it finds something that matches its definition of an e-mail address (my guess is that it would be something like [text]@[text].[text]) then it adds a mailto: hyperlink on it.

    This has nothing to do with the format you sent your mail in (text, RTF, or HTML). It also varies on the version of Outlook because it seems that Outlook 2007 is "smarter" at figuring out hyperlinks (both mailto and http) than 2003 is.

    If you don't want the address to display as a link then I recommend either adding spaces to the text:

    name @ company.com
    

    or changing the @ sign to something that a human would understand but which Outlook would ignore:

    name[AT]company.com
    

    Or just tell your recipients not to click on it and see if they follow directions :)

    0 讨论(0)
  • 2021-01-01 13:49

    I have a similar desire to include URLs in email messages that are NOT rendered as links. I'm trying to discourage users from clicking links in email as a security measure, but I haven't yet found a way to tell them what to type (or cut-and-paste) into their browser without the information being rendered as a link. I think it would be OK to just leave off the "http : //"; however, my URLs tend to be https.

    0 讨论(0)
  • 2021-01-01 13:50

    I did it like this:

    <span>username<span style="display: none;">@</span>@mail.com<span>
    

    The parser was not able anymore to identify the e-mail and didn't add the "mailto" hyperlink.

    0 讨论(0)
  • 2021-01-01 13:50

    after you paste the email, press backspace.

    0 讨论(0)
  • 2021-01-01 13:52

    Can you put it in a <pre>whatever@address.com</pre> tag?

    0 讨论(0)
  • 2021-01-01 13:53

    Outlook doesn't recognize this pattern as an email: @[text]@[text].[text]

    Thus adding before the email:

    <a style="color: black; text-decoration: none"><font style="display: none">@</font>**email**</a>
    

    and

    <style>font {display: none}</style>
    

    in the <head> tag will remove the mailto link.

    0 讨论(0)
提交回复
热议问题