Click here to Skip to main content
11,935,066 members (51,558 online)
Click here to Skip to main content
Add your own
alternative version


32 bookmarked

Sending Email From JavaScript using OutLook Automation

, 22 May 2006
Rate this:
Please Sign up or sign in to vote.
This is a client side script to send emails using Outlook Express. You can add this script on a click event of a button on your ASP.NET page; this script will create a mail message (to, from, cc, attachments, body) and open Outlook Express with these data and let you send the same email.


Sometimes we have very specific requirements for sending emails. I had faced the same problem. Our client wanted to send email by only using Outlook 2003. The Office 2003 was installed only on the client machine, so I had to create a client side code to send an email through Outlook Express 2003. I could easily send email with ASP.NET and SMTP protocol, but the client wanted to use Outlook 2003 to send an email, which inspired me to write the following code. The code is written in JavaScript and ASP.NET.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Kushan Thakershy
Web Developer
United States United States
I am a student and right now pursuing post graduation in software development and management.

You may also be interested in...

Comments and Discussions

QuestionPort this for full version of outlook? Pin
Dannoman123413-Oct-15 4:25
memberDannoman123413-Oct-15 4:25 
QuestionHow could I change the name of the attachment? Pin
Ridwan Habbal19-Feb-09 0:31
memberRidwan Habbal19-Feb-09 0:31 
Generali acn't downlaod Pin
ani.thettayil2-Feb-09 19:10
memberani.thettayil2-Feb-09 19:10 
GeneralSending a mail using Javascript Pin
Member 337739117-Dec-08 19:05
memberMember 337739117-Dec-08 19:05 
GeneralIn Internet, the browser throws error and outlook is not opening when attachment Pin
Biru25-Sep-08 0:17
memberBiru25-Sep-08 0:17 
QuestionActiveX control [modified] Pin
Member 38938558-May-08 7:25
memberMember 38938558-May-08 7:25 
AnswerRe: ActiveX control Pin
chandrasenareddybhumireddy1-Jul-09 20:02
memberchandrasenareddybhumireddy1-Jul-09 20:02 
GeneralBrilliant!!! Pin
dipan_das17-Apr-08 6:32
memberdipan_das17-Apr-08 6:32 rock baby....;) Pin
ahmarshi11-Jul-07 11:03
memberahmarshi11-Jul-07 11:03 
Questioncan u make it general Pin
msamido19-Sep-06 7:45
membermsamido19-Sep-06 7:45 
AnswerRe: can u make it general Pin
Uday Patil12-Feb-09 0:59
memberUday Patil12-Feb-09 0:59 
The script uses Outlook.Application COM object.

This Prog ID used is a generic Prog ID. Windows would decide which version to open based on the following registry key HKLM->SOFTWARE->Classes->Outlook.Application->CurVer

Hope this answers your query.



Generalmaking it general.. Pin
akshatdon26-Jul-06 1:05
memberakshatdon26-Jul-06 1:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.151126.1 | Last Updated 22 May 2006
Article Copyright 2006 by Kushan Thakershy
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid