1 // Note: not using Vue, but would be possible
2 function trySendMessage()
4 let email
= document
.getElementById("userEmail");
5 let subject
= document
.getElementById("mailSubject");
6 let content
= document
.getElementById("mailContent");
7 const error
= checkNameEmail({email: email
});
10 if (content
.value
.trim().length
== 0)
11 return alert("Empty message");
12 if (subject
.value
.trim().length
== 0 && !confirm("No subject. Send anyway?"))
21 subject: subject
.value
,
22 content: content
.value
,
27 let emailSent
= document
.getElementById("emailSent");
28 emailSent
.style
.display
= "inline-block";
29 setTimeout(() => { emailSent
.style
.display
= "none"; }, 2000);