标签云

微信群

扫码加入我们

WeChat QR Code

I wrote this simple code:var email;do { email = prompt('Inserisci il tuo indirizzo eMail'); if ((email.indexOf("@") == (-1)) || (email == "") || (email == undefined)) {alert("Inserisci un indirizzo mail valido");}}while ((email.indexOf("@") == (-1)) || (email == "") || (email == undefined));var subject = ('My Armchair');var body = new Array();body[0] = sessionStorage.getItem('imuno');body[1] = sessionStorage.getItem('imdue');location.href = "mailto:babini.francesco@queensrl.net" + email + '?subject=' + subject + '&body=' + body[0] + body[1];location.href = "../index.html";The check is ok, but it doesn't send the email, someone knows why? Thank you!


Yes, i know, thank you for replying! Please read my other comments!

2019年04月18日35分09秒

Please read my answer in its whole, I give you the trick to both open the email page and redirect the visitor :)

2019年04月19日35分09秒

Ops sorry, i missed that part! :)

2019年04月18日35分09秒

I was about to ask if that was the symptom he was seeing... :)

2019年04月19日35分09秒

Actually, that was the problem! How can i move to that URL once the email has been sent then?

2019年04月19日35分09秒

You can't. What if the user is a GMail user? They'll have gone to another website. If you want to have any control over email sending, so it server side from your own systems.

2019年04月18日35分09秒

Since I'm learning lenguages by my own, i haven't started server side lenguages yet.

2019年04月18日35分09秒

In order to move to that URL, I can write another function that just move to other page, can't I?

2019年04月19日35分09秒