2

I have three mailto links on my page with 3 different email address. Also i have button called "open all links" which should open all 3 links. I have made code which after click on button make program click on each mailto link. here is sample of my code:

var buttonclick = document.getElementById('undefined-33-581');
buttonclick.onclick = function(){          
  var firstlink = document.getElementById("tmp_button-64301-137");
  firstlink.getElementsByTagName('a')[0].click();   
  document.getElementById('undefined-33').click();
  document.getElementById('undefined-33-896').click();
}; 

But problem is that in Chrome i get error "Not allowed to launch ... because a user gesture is required." for second and third links. So only one mailto to links runs. In other browsers (in Edge, Firefox) all 3 links open without problems. Is it any way how to run all 3 links in Chrome?

web-wolf
  • 91
  • 10
  • sounds like Chrome says no can do. – epascarello Aug 28 '20 at 21:05
  • If you're trying to email 3 people you can modify the mailto links to mailto each of these 3 emails, take a look at this https://stackoverflow.com/questions/13765286/send-mail-to-multiple-receiver-with-html-mailto#:~:text=1%20Answer&text=%22There%20are%20no%20safe%20means,from%20a%20mailto%3A%20link.%22 answer – Ameer Aug 28 '20 at 22:02

0 Answers0