Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Automate Outlook 2000 to send an email on intranet

Posted on 2004-10-01
6
Medium Priority
?
201 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 15

Accepted Solution

by:
justinbillig earned 2000 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 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
Technology Partners: 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
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…

618 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