.NET Forum / .NET Framework / General / December 2005
Outlook integration in vb.net Web development
|
|
Thread rating:  |
Gerhard - 20 Dec 2005 04:56 GMT I'm posting this again, as no answer to the first post....
I would like to integrate Outlook into my vb.net web page, so that when I send an email (which I can successfully do now), it shows up in the sender's Outlook Sent Items.
How do I do that?
Thanks.
Cor Ligthert [MVP] - 20 Dec 2005 07:37 GMT Gerhard,
That depends how you sent the email. If you use a kind of serverside smtp than it will never show up. If you use the default mailclient with a little bit of javascript starting by registerscript than it goes automaticly.
I hope this helps,
Cor
> I'm posting this again, as no answer to the first post.... > [quoted text clipped - 6 lines] > > Thanks. Gerhard - 20 Dec 2005 16:39 GMT Thanks.
I'm using System.Net.Mail.SmtpClient. If that isn't what I should be using, what should I use?
Do you have an example of the Javascript needed to get it to show up in Outlook?
Bob
> Gerhard, > [quoted text clipped - 16 lines] > > > > Thanks. Cor Ligthert [MVP] - 20 Dec 2005 19:15 GMT Gerhard,
It is in VB.net code
Button1.Attributes("onClick") = "window.location='mailto:n...@non.com?subject=Cor demo&body=I hope this helps?';"
It is C#
Almost the same with [] for the collection of attributes and a ; behind the last aphostrophe.
I hope this helps a little bit?
Cor
> Thanks. > [quoted text clipped - 29 lines] >> > >> > Thanks. Gerhard - 20 Dec 2005 19:31 GMT Thanks for the javascript.
So using System.Net.Mail.SmtpClient there is no way to get this into an Outlook mail sent box (the user mailbox is on the same network as the web server)?
Thanks.
Bob
> Gerhard, > [quoted text clipped - 46 lines] > >> > > >> > Thanks. "Peter Huang" [MSFT] - 21 Dec 2005 02:11 GMT Hi
The Smtp Client runs the SMTP approach, but outlook's message which running with Exchange will run MAPI approach. So the System.Net.Mail.SmtpClient did not go in the MAPI side.
Also for your scenario, you may also try the outlook automation.
819398 How to automate Outlook and Word by using Visual C# .NET to create a pre-populated e-mail message that can be edited http://support.microsoft.com/default.aspx?scid=kb;EN-US;819398
182614 OL98: Programming Examples for Referencing Items and Folders http://support.microsoft.com/default.aspx?scid=kb;EN-US;182614
Best regards,
Peter Huang Microsoft Online Partner Support
 Signature Get Secure! - www.microsoft.com/security This posting is provided "AS IS" with no warranties, and confers no rights.
Gerhard - 21 Dec 2005 18:41 GMT Thanks. Maybe I am having a blonde day, but I still don't see how set this up in a web app (the examples deal with Windows apps). I don't find any references that can be added to connect to Outlook.
I need to be able to interface with Outlook (on the same intranet as the web server) from a vb.net web app.
Can you help?
Thanks.
Bob
> Hi > [quoted text clipped - 18 lines] > Get Secure! - www.microsoft.com/security > This posting is provided "AS IS" with no warranties, and confers no rights. Cor Ligthert [MVP] - 21 Dec 2005 18:45 GMT Gerhard,
On Internet I dont believe Outlook interop will work, however now you write Intranet than is this the webpage to look for.
http://msdn.microsoft.com/msdnmag/issues/02/06/rich/default.aspx
I hope this helps a little bit?
Cor
Gerhard - 21 Dec 2005 20:14 GMT Hi,
Thanks, but this is still talking about windows apps. I need to be able to code it in a web application. It seems to me that since the code is running on the same intranet as the exchange server, there should be some way to integrate with it.
Sorry to keep bugging you....
Bob
> Gerhard, > [quoted text clipped - 6 lines] > > Cor Cor Ligthert [MVP] - 22 Dec 2005 06:04 GMT Gerhard,
> Thanks, but this is still talking about windows apps. I need to be able > to > code it in a web application. It seems to me that since the code is > running > on the same intranet as the exchange server, there should be some way to > integrate with it. No the page goes about using Windows forms controls (or none) on a webapplication and the security problems you have to overcome with that (You are reaching the clients disk).
Cor
"Peter Huang" [MSFT] - 22 Dec 2005 02:50 GMT Hi Bob,
I am sorry if I have any misunderstanding.
Yes, you are right, we did not recommend automation Outlook in ASP.NET(web application) directly, it is an unsupported approach. But we commonly can do the outlook automation in the client side, e.g. in the script of the web page.
Based on my understanding, your web application will send a mail via certian user's account. If this is a defined user account, e.g. user A, then the sent mail should be put into the user A's outlook sent items folder, am I right? But if another user B access the asp.net page, and send mail, then under whose account, the mail will be sent, and where the sent items message will be put into, A or B?
So I think maybe we can put the send mail action at the client side. So that if user A access web page and automation outlook at client side to send mail, after doing so, a sent item will occurred in the sent item folder. So did user B.
As I said before, when outlook is working with Exchange, it goes the MAPI way which is different from the SMTP way when we use System.Net.Mail.SmtpClient. So if you send mail via SMTP server in your ASP.NET web application server side (outlook can work with SMTP), the outlook has no idea about that the mail has been sent.
Best regards,
Peter Huang Microsoft Online Partner Support
 Signature Get Secure! - www.microsoft.com/security This posting is provided "AS IS" with no warranties, and confers no rights.
Gerhard - 22 Dec 2005 19:04 GMT Thanks for getting back to me.
Basically, there is only one account that will be sending from the server side (the one that sends out password updates, and things like that), and my client would like copies of the emails that are sent in the administrator's sent mail box. Right now, I am sending the email using smtp. Is there a way, using ODBC or something, that I could also put a copy into the administrators Sent Items?
I appreciate your help.
> Hi Bob, > [quoted text clipped - 30 lines] > Get Secure! - www.microsoft.com/security > This posting is provided "AS IS" with no warranties, and confers no rights. "Peter Huang" [MSFT] - 26 Dec 2005 05:53 GMT Hi
Because the SMTP mail is different from the MAPI mail, I suggest you try use WebDav to send email via Exchange server which will be integrated with outlook. 313128 How to send an e-mail message by using WebDAV in Visual C# .NET http://support.microsoft.com/default.aspx?scid=kb;EN-US;313128
290407 How To Use COPY in WebDAV to Copy a Mail Item to Another Folder http://support.microsoft.com/default.aspx?scid=kb;EN-US;290407
290197 How To Use MOVE in WebDAV to Move a Mail Item to Another Folder http://support.microsoft.com/default.aspx?scid=kb;EN-US;290197
Best regards,
Peter Huang Microsoft Online Partner Support
 Signature Get Secure! - www.microsoft.com/security This posting is provided "AS IS" with no warranties, and confers no rights.
Gerhard - 26 Dec 2005 16:48 GMT Thank you. This looks like it will do what I need.
> Hi > [quoted text clipped - 17 lines] > Get Secure! - www.microsoft.com/security > This posting is provided "AS IS" with no warranties, and confers no rights. "Peter Huang" [MSFT] - 27 Dec 2005 01:51 GMT Hi,
Thanks for your quickly reply! You are welcomed!
Best regards,
Peter Huang Microsoft Online Partner Support
 Signature Get Secure! - www.microsoft.com/security This posting is provided "AS IS" with no warranties, and confers no rights.
Free MagazinesGet these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...
|
|
|