.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Retrieve Email Attachments from Exchange 2003

Posted By:      Posted Date: April 10, 2011    Points: 0   Category :WPF

I need to retrieve email attachments from a mailbox on an exchange server. Its exchange 2003 so don't have the option of using Exchange Web Services (which would make this a lot easier!).

Ideally looking to do this in a console app, which I can then expose as a service.

Some of the API libraries out there might be out of the question for security reasons.

Any suggestions / advice / code examples greatly appreciated.

View Complete Post

More Related Resource Links

C# , Sending email through exchange server?

I've searched on this and tried several methods using System.Net.Mail but I can't get it to work. I want to send email using the Exchange server they have at work. Anyone could show me how to do this (server requires authentication)   Thanks in advance

trust outlook 2003 application object when sending email c#

i am using outlook 2003 to send email but this outlook version always not trust application option so that before send email, always prompt a security dialog box to ask me to send email or not. how can i trust all outlook application object using vs 2008 or set in outlook 2003 anyone help

SQL Server Tables and Exchange Web Services sample does not include email body

I've sucessfuly implemented the above, very useful example. However, I cannot work out how to include the Body of the email with the reast of the data. Can anyone shed some light for me? Thanks Robert

Email Problem with Exchange 2010

Good day,   I recently upgraded a server of mine with a simple ASP site to server 2008 and it sent emails from exchange 2003 with no problems after the upgrade to server 2008.  Here is the code: private void SendTextMessageCC(string fromAddress, string fromName, string toAddress, string subject, string body, string ccAddress) { try { MailAddress fromAdd = new MailAddress(fromAddress, fromName); MailAddress toAdd = new MailAddress(toAddress); MailAddress ccAdd = new MailAddress(ccAddress); MailMessage msg = new MailMessage(fromAdd, toAdd); msg.Subject = subject; msg.Body = body; msg.CC.Add(ccAdd); SmtpClient client = new SmtpClient("deexch1.****.com"); // localhost client.Send(msg); // msg.DeliveryNotificationOptions = 0; // 2 means OnFailure was 1 but that was error 0 okay means "None" } catch (SmtpException s) { lblSuccess.Text = s.Message; } } Now this week I upgraded my Exchange Server to 2010 and changed the smtpclient string accordingly above to SmtpClient("draw-mail1.****.com"). It will not send emails from the se

Exchange 2003 Inbox and Calendar webparts for MOSS 2007


I've created one Inbox and one Calendar wepbart as descibed here:


using  OWAInboxPart and OWACalendarPart (code below).

When deploying them and placing them on the same page, only one of them will show anything. It looks like the last added webpart works, while the other won't.
If any one of them is placed alone on a page, they work as expected.

Does anyone know how to make them work togheter on the same page?

Thank you for your time!

Best regards,
Hans Erik Storeide

Inbox wp:

using System;
using System.Runtime.InteropServices;
using System.Web.UI;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Serialization;

using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;
using Microsoft.SharePoint.Portal.WebControls;
using Microsoft.SharePoint.WebPartPages;

namespace Inbox
    public class fmno_Inbox : System.Web.UI.WebControls.WebParts.WebPart

email attachments being dropped from specific mail types


We have been using Bright mail and sending attachements to SharePoint without issue until September. 

Once into September any attachments comeing from Bright Mail are dropped. 

The attachment is in eml file... when timer job kicks off it strips the attachment - body and subject gets delivered....  We are thinking that perhpas with the month of September there is a character restriction??  Since the issue only started in September ... if we send the same atttachement from outlook it gets processed properly.  Wondering if there is possibly some issue between Bright Mail character size and sharepoint??

Any suggestions appreciated!

Exchange Web Services - Attachments not working


I am trying to attach files using the Exchange Web Services in C#.   I generated a web reference in my C# project by pointing to the wsdl within EWS.  The path is <EWS Server>/ews/services.wsdl.

When I run this line of code:

esp = _esb.CreateAttachment(reqCreateAttach);

I get the following error:

{"The request failed schema validation: The element 'CreateAttachment' in namespace 'http://schemas.microsoft.com/exchange/services/2006/messages' has invalid child element 'Attachments' in namespace 'http://schemas.microsoft.com/exchange/services/2006/messages'. List of possible elements expected: 'ParentItemId' in namespace 'http://schemas.microsoft.com/exchange/services/2006/messages'."}

reqCreateAttach is of the type CreateAttachmentType.

It contains an array of FileAttachmentTypes.

Please help.

SP2010 - Email with multiple attachments


We have SP2010 and Exchange 2007 and most users working with Outlook 2007.  I've doen a search but wasn't able to find any relevant information on this site or the web.  We can easily select a document and click the "Email A Link" button in the ribbon and send the email with a link.  What we can't seem to do is select multiple documents and then email the selected links. Is there a setting somewhere for this, another way to do it, or am i just hosed on this one?



Retrieve user email address from text box


I have an Technical Service Request InfoPath form and an email alert needs to be sent to two users each time that the form is completed and submitted to a library. An email alert needs to be sent to our technical manager which is a relatively easy workflow to set up in SharePoint Designer. The other user which needs to be alerted is the engineer which could be one of six people (we only have one technical manager).

The person completing the form will have to enter the name of the engineer to whom the alert should be sent to. I am struggling to send an email to this user. Is there a way to associate an email address with the name which is entered? We could use drop down lists and need to automate this in some way.

We dont need to retrieve full user information from AD but just need the email address of the user whose name is captured in a Text Box named 'Engineer'.

Any suggestions or assistance would be greatly appreciated,

Many Thanks

SharePoint Portal Server 2003 - email alert based on due date


Hello All,

Hoping someone can help us here.

Note:Workflow/3rd party solutions not an option-

We would like to send an email alert when a list items due date is eqaul to "today".

We are trying to manage some certificates of compliance by flagging the "due date of the particular certificate (list item)" and sending an alert email when that occurs.

Is this feasible in any manner without workflow?

Is it possible to send an alert based on a calculated field when that calculated data changes? .

Any direction would be appreciated.

Thank you

Mike Harvey
Software Solutions Architect


Add Column to show email has attachments




How can I add a column to a document libary to should that an email has an attachment.  I just want to mimic what you would see in outlook, ie the paperclip icon.



Get email from Exchange server in C#?


Hi all,

If I've understood right there is no built in functionality in an version of .NET för checking email on an Exchange server, is that correct?
If that is correct, does anyone know of any (free) component to use for this?

What I want to achieve is to have an application that checks the email on an Exchange server and the performs different actions, depending on the content of the email.


Configure My Calendar in SharePoint 2003 and Exchange 2007

We have upgraded Exchange to 2007.  I change the URL on the "My Calendar" page to read http://<server>/owa.  It brings back 404 - File or directory not found.  I have even tried http://<server>/owa/?cmd=contents&module=calendar&view=monthly which works from IE.  It tells me invalid characters.  We will not be upgrading to Sharepoint and Exchange 2010 until second half of next year.  What am I doing wrong?

WSS 3.0, Windows Server 2003 with Hosted Email


I am using Windows Small Business Server 2003 with WSS 3.0.  I am having a problem with setting up WSS to email anyone.  The email is hosted by a different Company.  The Company has purchased only the use of POP and not Exchange.  

I have called the Hosted Company and received all the information I need from them, but nothing works.  It seems like you cannot use hosted email with WSS 3.0, what I mean is that you cannot use your WSS 3.0 with Hosted email at all.  

Is this even possible.  I have tried several different methods to try and get it to work, but everything keeps stating errors.  What am i doing wrong?

Document Library incoming email attachments not showing To/From information


I have a document library setup to accept incoming emails as attachments.

When I send an email the document library receives it, the only problem is it doesn't show any of the header information such as who sent it, who it was sent to, who was CC'ed.  Is there any way to have this information shown?

Basically what I'm expecting to see before the body message is the From, To and CC.

Any help would be most appreciated.

MOSS 2007 email integration question (Not with Exchange)


Does anyone have any experience with integrating MOSS 2007 with the business/government edition of Gmail?  Is there any documentation/blogs/anything out there?  I've googled but not been able to find anything (yes, it's highly possible I'm just not using the right search string) really.

MOSS 2007
Server 2003 R2 Enterprise
SQL 2005 SP3 (separate)

Currently we have exchange set up to handle everything but will be going to Gmail in the next few months (not my choice, not my decision).  I have no idea how/if this is going to work with SharePoint.

Any information or pointers to info would be much appreciated.

Veronica Harris

Share Point 2007, Exchange 2003 and Outlook 2002 - Tasks and Calenders


Hi All,

I need some help in find out if I can do the following in Share Point 2007.

1. Can a task be assigned to a user in Share Point, which will appear in there personal Outlook account under the task list?

2. Is the Calendar in Share Point a separate entity from the exchange server? i.e. - I would like to use to the calendar in Share Point to manage meeting etc and send out invitations from the Share Point site, that if accepted would appear in the user's personal Outlook account.

3. Can the Gantt Chart view be mirrored to the task list?

I hope I’ve explained the requirements correctly for people to be able to provide feed back.



ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend