Open OUTLOOK without an especific "to:" adress and a HTML code in the body. Javascript or ASP.NET

I want to send a mail with a HTML code to any of my outlook contacts (groups) from a (vbscript) - javascript application. I don't care if the HTML is in the body or attached.
I used CDONTS but the problem is that i can't choose my outlook contacts.
I try but the problem here is that i can't send a long HTML code string, querystring limit.
Please !!! I need help !!!
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Accessing a client's outlook data from a web page is something that would probably never work well.
1 Any browser would prevent you from running activex unless explicit permission is granted (In IE's , Internet Options , go to the Security tab -> from Custom Level go to Initialize and script ActiveX controls not marked as safe for scripting and select Prompt)
2 Outlook will try and prevent external objects to get access to it's data.
3 Not all clients use outlook
The list goes on...

var Const_olFolderContacts = 10;
var objApp = new ActiveXObject(Outlook.Application);
var objNS = objApp.GetNamespace(MAPI);
var colContacts = objNS.GetDefaultFolder(Const_olFolderContacts).Items
for( var i=1; i<=colContacts.count;i++)
 var v = colContacts.item(i);
 alert(v["FullName"]+ (+v["Email1Address"]+));

Open in new window

antonio1313Author Commented:
Great !! I know this is not the right way ... but it's the client way.
Thank u !!
I don't use exactly what you say but you help me to find the solution. The code I post is what I used. With this code I don't need to select "Prompt" ... only "Ask" in the IE configuration.

function openMail() {
	try {
		var objApp = new ActiveXObject("Outlook.Application");
		var objNS = objApp.GetNamespace("MAPI");
		var theMailItem = objApp.CreateItem(0) 
		theMailItem.Subject = ('<%= subject %>');
		theMailItem.HTMLBody = ('<%= strHTML %>');
	catch(e) {
		alert("An error message")

Open in new window


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.