William Pessoa

I need to convert every outmound email into a attachment. Does anyone know what I need to do to accomplish this on outlook (or exchange)

Very email needs to be converted into an attachment.

Thanks in advance!!!




Re: Visual Studio Tools for Office Converting HTML email body into HTML attachment (ex message.html)

Sue Mosher - Outlook MVP

I can't imagine the purpose of this -- it certainly would annoy most recipients -- but in a VSTO add-in, you'd do it by using the Application.ItemSend event to get each outgoing item. Get the value of the HTMLBody property and use that to create an .htm file. Use the Attachments.Add method to add that file as an attachment. Finally, set the HTMLBody property to a blank string.

How to do it on the Exchange side would be a question to ask in the microsoft.public.exchange.development newsgroup or at http://forums.microsoft.com/TechNet/ShowForum.aspx ForumID=838&SiteID=17





Re: Visual Studio Tools for Office Converting HTML email body into HTML attachment (ex message.html)

William Pessoa

The only way to send formated - eFaxes - is through html attachements with a specific html tag...

It sounds like that this code you are refering to is to be placed on the email client side... is there any way to put this on the smtp server if I have a dedicated server for these types of messages.

If I cannot do this on the server, I am thinking I can have setup a routing rule on the mail server to route all these message to a common mailbox, subsequently I would have a client monitoring this pop account and I would have a rule to run this script that you are refering to once the message is popped and then forward the converted message to its destination (which we would parse out of the original message). If there is easier way to do this, please let me know. Bottom line this will not annoy recipients because they will be fax machines around the world.

I have never written the code you are mentioning below and I sort of need a CRP/demo for tomorrow.

Thanks again!!!

PS. I posted the same question on the Exchange side as well.






Re: Visual Studio Tools for Office Converting HTML email body into HTML attachment (ex message.html)

Sue Mosher - Outlook MVP

Well, this is a forum for building client-side add-ins and document applications, so there's a certain assumption that anyone posting an Outlook question here is looking for a client solution. If you want to build a server-based application to intercept the SMTP stream, then that's way beyond the scope of this forum and my own expertise and would depend to a certain extent on what programmability hooks your particular server offers.

A "run a script" rule VBA procedure is not a reliable solution for what sounds like a business-critical, unattended operation, but it would probably do for a proof-of-concept demo.





Re: Visual Studio Tools for Office Converting HTML email body into HTML attachment (ex message.html)

William Pessoa

The code that you were refering to...using the VSTO add in... how would that be invoked When the message is sent from that email client... therefore if I implement it will work like the run script approach correct

Thanks!






Re: Visual Studio Tools for Office Converting HTML email body into HTML attachment (ex message.html)

Sue Mosher - Outlook MVP

An add-in is tightly integrated into the host application and can listen to the events that application raises. If you want to process incoming mail in a central mailbox, the relevant event would be Application.NewMailEx, which fires each time the user receives new messages. However, it's not 100% reliable, so you might want to couple it with a timer operation to check every so often to see if something new has arrived that didn't get processed.

If you want to process outgoing messages from all senders, then the relevant event, as I originally mentioned, would be Application.ItemSend. Both are well documented in Outlook developer help and on MSDN.





Re: Visual Studio Tools for Office Converting HTML email body into HTML attachment (ex message.html)

William Pessoa

Thanks!!!!