mailto attribute does not open

Asked

Viewed 246 times

0

I’m using the html tag for email link:

<a href ="mailto:[email protected]">Entre em contato</a>

But it just won’t open, nothing happens. My OS is Windows 7 Ultimate 32bits Email server is Thunderbird and already tested in opera, Chrome and explorer and none works.

I tested other url link tags and it works normally

  • Here worked on Chrome Win10 smoothly...

1 answer

0


good, first of all, there is nothing wrong with your code and it can be tested below: What I added and can help you is a "hack" to check the event "Blur window" as soon as triggered the event

(function($) {
  $('a[href^=mailto]').each(function() {
    var href = $(this).attr('href');
    $(this).click(function() {
      var t;
      var self = $(this);

      $(window).blur(function() {
        // The browser apparently responded, so stop the timeout.
        clearTimeout(t);
      });

      t = setTimeout(function() {
        // The browser did not respond after 500ms, so open an alternative URL.
        document.location.href = '...';
      }, 500);
    });
  });
})(jQuery);
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<a href ="mailto:[email protected]">Entre em contato</a>

References https://www.uncinc.nl/nl/articles/dealing-mailto-links-if-no-mail-client-available https://stackoverflow.com/questions/7214686/detecting-when-mailto-failed

  • Amigo updated the explorer and ran the code and already showed me that it is a problem in the mail server. I do not know what happened, because it was working. But thanks for the direction!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.