Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Q1756 How can I send email from a form that works also with Outlook/Outlook Express?

irt.org | Knowledge Base | JavaScript | Email | Q1756 [ previous next ]

Q1756 How can I send email from a form that works also with Outlook/Outlook Express?

Just a working example how to send form e-mail with Microsoft Outlook Express (and Outlook) without starting these programs (although they will receive a warning message!):

<html>
<head>

<body>

<script language="javascript">
functionupdate() {
  alert("sorry not supported");
  return false;
}
</script>

<script language="javascript1.2"><!--
function update() {
  document.emailForm.action = 'mailto:' + document.hiddenForm.emailAddress.value +
    '?SUBJECT=' + document.hiddenForm.subjectLine.value;
  document.emailForm.elements[' '].value += '\n\n';
  document.emailForm.submit();
  return false;
}
//--></script>

<form name="hiddenForm" onSubmit="return false">
Email Address: <input type="text" name="emailAddress" value="someone@nospam.com">
<input type="hidden" name="subjectLine" value="subject description ">
</form>

<form name="emailForm" method="post" enctype="text/plain">
<textarea name=" ">
blah blah blah  :-)  enter here some text 
some text

you can even make more form elements if you want 
</textarea>
<input type="submit" onClick="return update()">
</form>

</body>
</html>

Submitted by M. Posseth

Feedback on 'Q1756 How can I send email from a form that works also with Outlook/Outlook Express?'


Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.