Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q1139 How can I send an email?

You are here: irt.org | FAQ | JavaScript | Email | Q1139 [ previous next ]

JavaScript cannot initiate an email. Only the user, by clicking a link or a form, can send an email.

An opposing argument was put forward by Clif Hopwood:

How about:
function mailIt() {
    Mail="mailto:me@nowhere.com?subject=Help";
    window.location.href=Mail;
}
which opens the clients mail composer, unless Outlook grabs it, but that isn't a limitation caused by JavaScript. Additionally I have used JavaScript to send a form using "action=mailto".

However, the user still has to hit the send button - thank goodness!

For email examples, take a look at the email articles on irt.org.

Feedback on 'Q1139 How can I send an email?'

©2018 Martin Webb