Solved

Automate Outlook 2000 to send an email on intranet

Posted on 2004-10-01
6
195 Views
Last Modified: 2008-02-01
I am trying to use javascript to create an email with outlook that will be sent to me. I am on an intranet, and we all have outlook installed. I tried to use the send to email option on the form in Frontpage, but that option is not installed on the server. Plus, I would like to have more control over hoe the email looks too. Any help would be appreciated!!

Dan
0
Comment
Question by:robotman757
  • 3
  • 3
6 Comments
 
LVL 15

Accepted Solution

by:
justinbillig earned 500 total points
ID: 12199106
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=6480&lngWId=4

Here is a way to do it in VBScript that can easily be converted to javascript, but there might be some browser security settings even though your on the intranet ... i remember i tried to do this once but abandoned it.

Sending email from the client is very ify, you have to change security on everyones machine.

It's much easier to send it from the server.
0
 
LVL 15

Expert Comment

by:justinbillig
ID: 12199139
0
 
LVL 3

Author Comment

by:robotman757
ID: 12199440
I know what you mean on the security thing. I did figure out how to get the email to work, but I realized I did not put in the more important part. I want to be able to use a custom form and prefill some of the fields on the custom form. That is where the main problem is. This is the code I have tested, and it works to load the form. I want to have some of the fields filled in with stuff the user types in from the form on their machine. Then I would like to be able to get that informationfrom the email.

function OpenOutlookDoc(whatform)

{
outlookApp = new ActiveXObject("Outlook.Application");
nameSpace = outlookApp.getNameSpace("MAPI");
mailFolder = nameSpace.getDefaultFolder(6);
mailItem = mailFolder.Items.add(whatform);
mailItem.Display(0)
}

The form has fields in it that I want to be able to fill with the javascript code...
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Author Comment

by:robotman757
ID: 12202716
okay..so I tried to add these lines and it still works!!

mailItem.To = strTo;
mailItem.Subject = strSubject;
mailItem.Send();

When I add a line with a custom field on the form such as this...

mailItem.WorkID = "Test";

I get an error about "this object doesn't support this property or method"

Not sure what the issue is...Any clues...any one...
0
 
LVL 15

Expert Comment

by:justinbillig
ID: 12218040
which line do you get it on?

send the code?
0
 
LVL 3

Author Comment

by:robotman757
ID: 12304047
I figured it out. I lost my access for a while. I actually have it all working the way I want and it is pretty neat. Thanks for the help, and I will be awarding points
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Clear input text 15 26
javascript form submition 2 21
Table style position to the left 8 25
Get Text of Select using class name ***JavaScript Only*** 3 14
In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question