open outlook client with attachment - c#

I want to open outlook client with files attached to it.
The requirement is that i want to remove some properties of the document and after properties are removed want to attach this files to outlook client.
Can anyone suggest me how to achieve this using C#.
Thanks in advance.

If I understand you,
you want to open a new email, whcih could be send by the user?
I implemented this one, and it looked like this code:
http://www.codeproject.com/Tips/165548/C-Code-snippet-to-send-an-Email-with-attachment-fr

Related

Outlook plugin which required user input while installing

I am trying to create an Outlook plugin which will ask the user couple of Question like URL/Username etc when they try to install the plugin. Then want to save those data in a text file which can be access later on when needed.
Can someone please help me with this. I am very new in Plugin development.
Thanks
If your adddin is not configured on startup, display the necessary prompts when it is used for the very first time.

How to set a mailmessage as an attachment on another mailmessage

I have two mailmessages, I want to attach one two the other in vb.net or c#.
How do I do this?
I've had a look at msdn's pages for MailMessage and Attachment but can't wrap my head around it.
I've managed to send other files as attachments, do I do it in the same way? If so what mime type/MediaTypeNames would I use?
I've tried searching online (including SO) but all results are for attaching files etc (which are streams - I don't think mailmessage is?)
I'm sure it must be possible and I think I must be overthinking it, I hope someone can point me in the right direction.
Use Case
Just to clarify why I want to do this, its essentially a simple method to see the email exactly as it was generated, without sending it to the recipient(s) but preserving that metadata. Unit tests are well and good but being able to see the exact email in a browser (and show it to stakeholders) is invaluable.
Given your use case I would suggest a different approach (I use it myself to test SendMail): send your mail in a local directory as an eml.
Then you can use an email client to see the mail, or just explore it as a textfile to check the raw structure.
How to do it? Just configure your SMTP client class to deliver the mail localy when you want to test:
SmtpClient.DeliveryMethod = SmtpDeliveryMethod.SpecifiedPickupDirectory;
SmtpClient.PickupDirectoryLocation = directoryDelivery;
Hope it helps.

Read outlook emails c# without opening outlook

In c#, I am trying to watch for a particular email, then once I receive it, grab attachment and do something with it. I've done all this before BUT with outlook OPEN. I want to somehow do this without opening.
To access email in the past I used interop.outlook
Any ideas or things I should look into?
Thanks!!
You are going to have to use the EWS Api.
Here is the documentation

Outlook VSTO adding tracking pixel

I'm adding an img tracking pixel to items that have embedded content using my outlook addin which allows me to track when the person has open the email (pretty standard practice)
I do this by adding an image tag right before the closing body tag upon the send event.
The problem is, outlook then calls the url three times (twice with a method of "OPTIONS" and once with "GET"), this defeats the whole purpose of the tracking pixel because it triggers the event on send.
Does anyone know why outlook makes these requests, or how to get around this?
I see two possibilities:
Either Outlook or Exchange Server is checking the eMail content before sending it
OR
Outlook is configured to “When an HTML message contains pictures located on the Internet, send a copy of the pictures instead of the reference to their location” - for changing that setting in Outlook 2007/2010 via Registry see http://www.msoutlook.info/question/72
BTW: the two OPTIONS calls let me believe that Outlook is somehow checking the server of the linked image for WebDAV and/or Frontpage extensions...

Office Addin problem

I'm currently developing an add-in aimed to edit office documents stored in a codendi forge.
First problem was the read only flag on my file. A simple ‘save as’ solved that problem.
This solution was ok until I removed codendi’s cookie then instead of my file I received an error page.
What I want to do is to be able to catch an event triggered by office before it starts downloading the file. Then I can prompt the user for authentication and recreate a cookie by myself without the need for the user to open internet explorer and sign in.
Is there a way to catch an event indicating that word, excel and powerpoint are about to start a download?
Thanks in advance
I'm not sure I really understand what you want to do.
I don't think any office application actually downloads the wanted file, it is downloaded by your browser in a temporary file and therefrom opened by it.
I think that if you want to edit the file from you client, the best way would be to use the soap interface, which is part of Codendi. Have a look to
[yourforgehostname]/soap
[yourforgehostname]/soap/codendi.wsdl.php?wsdl
If you want to see the wsdl in a more readable form consider using
http://tomi.vanek.sk/index.php?page=wsdl-viewer
One of the supported API is login
Hope it helps

Categories