[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 202
  • Last Modified:

Automate Outlook 2000 to send an email on intranet

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
robotman757
Asked:
robotman757
  • 3
  • 3
1 Solution
 
justinbilligCommented:
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
 
robotman757Author Commented:
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 does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
robotman757Author Commented:
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
 
justinbilligCommented:
which line do you get it on?

send the code?
0
 
robotman757Author Commented:
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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now