Oops! It appears that you have disabled your Javascript. In order for you to see this page as it is meant to appear, we ask that you please re-enable your Javascript!

Mail to issues on devices/browsers, a workaround to help

 
 

Mail to issues on devices/browsers,a workaround to help

Lately I discovered that the mailto html command does not always work for all machines in all browsers.
When I did some research I discovered that it is not uncommon. In a number of cases it seems that this boils down to the client machine and its settings. My research suggested that it is not a server issue, nor is it a html coding issue. If you are using WordPress, it is also not a coding issue where you enter in the instruction. In this case, look at the ‘underlying code’ in text view (not in visual view) to be sure that it technically correct.

Issue may be something to do with client machine and its settings

Now as it appears to be something to do with the client machine and its settings, no way does a html coding developer or a web coding developer or a WordPress blogger have any control over that, nor does the support team where the website is hosted.

The ‘workaround’

The ‘workaround’ I use I actually used before I became aware of this issue. Chances are also pretty high you may also use this ‘workaround’ without actually realizing it. The following code will display on one line if there is enough space:/>
email:xyz@abc.com

The mailto code

There are extra spaces in the code below to prevent your browser trying to perform the mailto command. 🙂
So when you bring across into your environment, remove these unwanted spaces. 🙂
I include an image of the exact working code so that you see exactly what I mean. Computers are fussy, they need the syntax to be 100% correct. They need the and double quotes and the mailto command (I understand) to be in lower case, and the mailto command needs to be followed by :
Line 1… e m a i l :
Line 2…
Line 3… x y z @ a b c . c o m
Line 4…

Line 1 will just display email:
Line 2 is the code to go into mailto mode. Note that in real code there is a space between the “a href”.
Immediately prior to mailto is the double quote.
The mailto should be in all lower case followed immediately by the : followed immediately by the email address.
This is followed immediately by the double quote and it in turn is immediately followed by >.
Line 3 is the email address (in the real code, there are no spaces here.
Line 4 is the full closing tag.
Sometimes in line 3 people would have a “Send us an email”. In this instance and for this workaround I suggest that the email address is actually specified instead.
Note that of course in the real world, lines 1 to 4 above, may actually on just on one line.

This html code includes a human readable tag. This is because the closing tag at the end of line 2 is not like the full closing tag in line 4. The bit between the closing tag on line 2 and the full closing tag on line 4 is the human readable bit.
This displays the email address to the viewer as well. This code will display:

email:xyz@abc.com

If the mailto part does not work, for whatever reason, the viewer would see the above, see your email address, and if the person really wants to send you the email, they can grab your email address, open up their email program and send you this important email.

Again, this is not a server issue. It is not something that your web hosting support team can fix. It is the fact that so many computer clients and browsers don’t always follow the HTML coding mailto standards. They should. However they do not. So we have to work around this.

This coding trick will at least help you to work with this limitation if it affects your viewers and allow you to continue doing your thing.

I welcome any related comments. Please feel free to enter them below for our readership. Cheers. 🙂

Naturally, if you have a different solution, please feel free to outline your solution below. That way if more people have this problem, they have more options regarding a solution that could be used in their situation. Go for it. 🙂

However in this instance, I am not in a position to look at your code. Just make sure that your code is similar to above, as that code is working code. If you leave out a > or a /> or the double quotes, then your code is not similar to mine and may not work. 🙂

16 thoughts on “Mail to issues on devices/browsers, a workaround to help”

  1. Hello David,
    I use a lot of mailto buttons on my site and I am surprised to find there is a problem with them.
    Your information has been very helpful for a fix, workaround, as you put it.
    I am just learning html but I can code a little bit now and I understand most of the purposes of the symbols.
    You seem to have a pretty good grasp of it.
    Thanks
    San

    • Hi San,

      Yes, I only learned about the problem about 3 days ago and like you I was surprised that there is a problem with the command on some clients and some browsers, of which you or I when developing our websites have no control over. The workaround is a workaround that works, in the sense that if the command fails for whatever reason, at least the viewer can open up their email client and send an email, but only if our email address is included.

      Cheers,

      David

  2. Great article! I didn’t even know this was an issue so thank you for bringing it to my attention. You wrote clearly and elaborated on the issue. Though, I think to make it sound more appealing you should read through it a couple of times and replace a few repeating words so it doesn’t sound as repetitive. Otherwise, good article!

    • Thanks for your comments. Yes, you are correct. I tend to repeat myself. I tend to do this because when I was in college, one of the lecturers used the “tell them what you are going to tell them, then tell them, then tell them what you said” approach which for some reason I still remember today.

      I have worked in a support role, and it is amazing how often people say they followed the instructions, and it does not work. I then go through the instructions and discover with them, that they did not follow the instructions exactly.

      I hope that the article helped you before the issue may potentially affect you, and therefore the issue never really does. Best form of proactive response there is.

  3. Hello David! I’m glad I found your post. I know html but I didn’t know that the mailto command doesn’t always work.
    When we are programming we must always take into account the different browsers and write the code in a way that works for every browser. Now mailto is just one more thing to pay attention to.
    Thanks for sharing your knowledge it will help a lot of people for sure. Take care!

    • Hi Sandra,

      It is amazing the things that in html that we take for granted. Two weeks ago, I never gave the mailto command a second thought. Just used it and expected it to work in all environments. I wrote the article once I became of the issue so that people would have a ‘plan B’ should they wish to use it. I am also hoping that in time people will comment with their own workarounds which will make it more interesting.

      Thanks indeed for taking the time to comment.

      Best,

      David

  4. Thanks for the great tutorial on code and basic computer skill. When I started out on line just three months ago the code was always an issue. Here at Wealthy Affiliate I learn ways to understand the coding. The lessons are great and the step by step approach is making it much more understandable. You break it down even further which I appreciate. I learned a lot reading your post. Looking forward to more of your work. This was very helpful for me.

    • Hi Kirk,

      Thank you very much for the feedback. It is always good to hear that my articles helped someone. If you have any ideas for a future article, let me know here. You never know, I may just write that article. 🙂

      Have a brilliant weekend,

      David

  5. Hi David! A really good review.
    I appreciate very rarely my mail up with my articles. I’ve always been a little afraid to give too many of my very private info from me.
    But I have when researching just webmail accounts.
    Is it ok to link to one of them?
    Steen

    • Hi Steen,

      Thank you for saying ‘a really good review’. You have me bursting with pride. 🙂

      This intermittent problem applies on the device/browser when the HTML mailto command is being used. As a website owner or developer, you test your code/article and in an ideal world you confirm that the HTML mailto command works on every device (desktop computer, laptop, iPad, iPhone, smartphone and so forth) and on every browser combination (all the different versions of Internet Explorer, all the different version of Firefox and so forth). Who has the resources to do all that work? I know I do not, and most likely all my readers also do not.

      The mailto command does not always work in the expected manner, so when I found that out, I discovered a ‘work around’ which I use which I explained above. If the mailto command does not work, at least the viewer will see your email address and can send a normal email to that email address. I could use support@djtrlm.com or david@djtrlm.com as I use both.

      It is not the webmail account email address or the email account email address that is the problem. My ‘work around’ works for both webmail accounts and email accounts.

      Cheers,

      David

  6. Very interesting article on device browsers – covered a lot of aspects I was totally unaware of.
    Your knowledge of coding on this site is pretty awesome – I’ve had a look round and I’ve learned more than I ever knew in a ten minute period!
    Tell me, where is the best place to go to learn about advanced coding or web design?

    • Hi Chris,

      I am thrilled and excited that you found this article interesting and that it covered things that you were totally unaware of. Thanks for the compliment about my knowledge of coding. You had a very productive ten minute period learning about some coding information I put up on my website. That is fantastic. 🙂

      The best place to learn about building website etc in my opinion is:

      http://djtrlm.com/start

      The best news is that you can start this now for free, most likely in the comfort of your own home. No need to go to night classes after working all day. 🙂

      Then it is all a matter of ‘building’ your knowledge up at a pace that you are comfortable with, and with a really good grounding, the additional knowledge and know-how comes. This is all cumulative. The important thing in my opinion is to give yourself time.

      Cheers,

      David

  7. Hi David thanks for the great article on coding.i did not know a whole lot about coding before reading your post but thanks to you i have a better understanding.
    Your step by step approach is very helpful for people like me who have only basic computer skills,
    your website is interesting , informative and user friendly i wish you every success with your internet based business.

    • Hello Maureen,

      Thank you for your feedback.

      I find with coding that sometimes if I see working code that works rather than ‘pure documentation’ about the command, it makes more sense for me. I have seen code documentation that is so abstract that I find it difficult to make sense of it. If I see working code examples, that it makes a lot more sense.

      I am thrilled and delighted that you find my step by step approach very helpful. 🙂

      Best,

      David

  8. Hi David,

    Thanks for the article and fix you have provided for the coding issue for mail to on devices. As you say computers like precise information to work properly and a little thing like this can adversely affect some devices.

    Personally I have not had any issues with this as of now, but I am sure there will come a day when a client comes back to me and lets me know there is a problem. Now I have a solution should that happen! Bookmarked for future use! Thanks!

    Dave

    • Hi Dave,

      Thank you for your feedback. Sometimes it is pretty amazing the things that do not work on computers. This was one that I became aware off a while back and was very surprised about it as this is pretty standard functionally that you would expect to just work.

      Kind Regards,

      David

Leave a Comment

By using this form you agree with the storage and handling of your data by this website.

By continuing to use this site, you agree to the use of cookies. More Information.

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close