Solved

Automate Outlook 2000 to send an email on intranet

Posted on 2004-10-01
6
191 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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Today I would like to talk about localizing (Internationalization) JavaScript applications. Introduction When creating an application that is going to be used by many people around the globe, it is important to remember that not everyone speak…
Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
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…

705 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now