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

x
?
Solved

How To Automate Outlook Mail in a Web Application utilizing .net

Posted on 2011-04-22
9
Medium Priority
?
360 Views
Last Modified: 2012-08-14
PLEASE HELP!!!  SUPER STUMPED  

i have a government client that I develop a web application for.  They have a requirement that needs the web application to utilize the clients Microsoft outlook to send mail with attachments.  Do to the nature of this government client we have to use there outlook rather than other mail options because of the DOD's methods for encryption of attachments on email.  

We need the application to basically just open up outlook from our web application - populate the attachments and other items - and then send the mail - so that the PKI within the clients outlook is utilized.  We CANNOT install Outlook on the application server since this is a DOD server.  

Is this possible to do.  Please remember that this is a web application - Outlook 2007 - we are coding in C# but i will accept VB solutions as I can convert them myself.


Thank you in advance!!!!
0
Comment
Question by:Robb Hill
  • 5
  • 4
9 Comments
 
LVL 9

Expert Comment

by:radcaesar
ID: 35447541
Your requirement is not clear.  Outlook is the mail client, You want the replacement web app for that client, Right?

i.e. You want to read mails from their Mail server, Is it?
0
 
LVL 11

Author Comment

by:Robb Hill
ID: 35447587
No.


When they are using my web application......lets say they press a button that sais ...."email"  ....I need my c# code to open the default mail client - which in this case will be Outlook 2007.  Then populate the attachments, send to, cc, comments ....body...etc .....basically automate the process they would normally do manually. And then send the mail.

I have seen code out on the internet that does this but it all seems to require Outlook to be installed on the server where the web application lives...and we cannot do this since we do not have access to the DOD servers or there mail client.


We have to use Outlook to do this though do to the encrypition the DOD uses when sending mail.

Does that sound more clear?
0
 
LVL 9

Expert Comment

by:radcaesar
ID: 35447801
You want to send the automate mail, Is it?

Where did u have the attachment files, From ID and TO id?
0
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
LVL 11

Author Comment

by:Robb Hill
ID: 35447817
Just assume there are some files in a folder on the local drive.  The program needs to utilize outlook to send mail using outlook and be able to attach files.

How to you code this with .net....for a web form?
0
 
LVL 9

Accepted Solution

by:
radcaesar earned 1500 total points
ID: 35447951
So you want to hit the EXCHANGE Server to send the mail. You can use SMTP/MAPI.

http://www.msexchange.org/articles/Sending-Email-without-Client.html - Just for reference.

From C#, I will prefer system.Net.Mail

http://msdn.microsoft.com/en-us/library/system.net.mail%28v=VS.80%29.aspx

Steps,

1. Get the SMTP credentails from the server hosting company (SMTP IP/Name, USer, Password, Port)

2. Compose the mail using system.Net.Mail in C# and send the mail.

Now, your security will not broken (Since you are targetting the SMTP Server).

Here, No need to populate outlook on click/No outlook installation.

As I said, Outlook is just a client for mail server and it just fetch/send mails from/to the mail server.

0
 
LVL 11

Author Comment

by:Robb Hill
ID: 35447984
No your not answering my question.


1)  I cannot install Outlook on the Server

2)  I have to use Outlook on the client - because of the Certificate and Encryption that is in Outlook for attachments.

3)  I need to achieve the automation of creating and sending the email using asp.net and vb or c#.net.

4)  This is a web application.


I am very familiar with the system.net.mail library...that method does not use the PKI Cert / Encryption that Outlook has for attachments.

0
 
LVL 9

Assisted Solution

by:radcaesar
radcaesar earned 1500 total points
ID: 35448066
See my previous post fully. With MAPI you can. But, through web application, consuming a clients critical info will be a security issue and OS may block the same. I will not recommend this technique at any cost.

http://msdn.microsoft.com/en-us/library/cc678348%28v=office.12%29.aspx
 
0
 
LVL 11

Author Comment

by:Robb Hill
ID: 35459913
I couldnt go with any of these solutions....


We couldnt use mapi.....we couldnt put outlook on server...we couldnt use a javascript and activex solution....

Since we were out of the domain we basically couldnt do anything that allowed us to utilize their outlook client which basicaly allows their security paradigm to persist.


Oh well.....I am still giving points to you all as all of your solutions are valuable informatin on most Outlook mail and .net related scenarios.  ...just not mine:)
0
 
LVL 11

Author Closing Comment

by:Robb Hill
ID: 35459938
This solution does not work for my initial question...only keeping it for the effort and it can be helpfull for most other .net email questions.  The mapi solution was not explained very well.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

This article lists the top 5 trialware OST to PST Converter Tools. These tools save a lot of time for users when they want to convert OST to PST after their Exchange server is no longer available or other critical issues with Exchange server or impo…
MS Outlook undoubtedly is the most widely used email client.Its user-friendliness, cost effectiveness, and availability with Microsoft Office Suite make it the most popular email application.  Its compatibility with Microsoft applications like Exch…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses

810 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