Solved

Automate Outlook 2000 to send an email on intranet

Posted on 2004-10-01
6
197 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 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 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
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 
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: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
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…

724 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