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

Post New Web Links

using Exchange Web Services EWS to Read Email notifications

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


I have developed a dis attended windows service(services that runs in background) to send thousands of emails trough an Exchange Server. I'm using the following account to send emails mike@mydomain.com.

For some reason, our customers tell us that they never received the email(at least 25 customers complains about this). Because we send thousands of email we couldn't use an Outlook client to read the Inbox. I was thinking in use EWS. Whe use .net SMT client to send emails in Async way. But  let's think in the following scenario:

I send an  email today, and for some reason (network bottleneck) this messages  holds on the Exchange and couldn'be dispatched three days after.

Because our Windows services runs in background we can't catch this errors. The only way is try to read some notifications sents to the sender address( mike@mydomain.com in my case). How can I figure out this situation?



michaelfallas@gmail.com Michael Hidalgo Fallas

View Complete Post

More Related Resource Links

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

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

Email notifications

Hi AllI am trying to do the following:1- Have the user select a date from a calendar.2- When that date comes, an email is sent automatically to the user.3- The web application is on a server.Does anyone have code in place that does this already. I was referred to the following articles below, would they solve my problem??. This the first time I tackle a problem like this.http://msdn.microsoft.com/en-us/magazine/cc163821.aspx http://www.codeproject.com/KB/aspnet/ASPNETService.aspxhttp://msdn.microsoft.com/en-us/magazine/cc163821.aspxhttp://www.codeproject.com/KB/aspnet/ASPNETService.aspxwhich one of the above solutions if they solve my problem is better?ThanksHassan

Task assignment to user without read access in 2007 results in no email to assignee, no warning to a

It appears (from observation and searching) that SP 2007 will not send a task assignment email when the assignee does not have read access for the assigned task and there is no warning when assigning a task to someone who will be unable to read it. I have not been able to find any mentions of attempting to address this quirk by either an item event listener or a workflow that would either prevent the assignment or task the originating user to fix the issue by either changing the assignment or having them added to the appropriate group.  I could see one done badly causing a cascade of tasks. The approaches that I've thought about are: Attempt to block assignment by hooking ItemAdding and ItemUpdating on the task content type.  In ItemUpdating, you could use SPListItem.DoesUserHavePermissions since the SPListItem should be there, but you'd may have check the list since I don't think SPListItem is available at that time.  I could see this causing problems when the assignment is via workflow or something that doesn't like other code interfering with its task creation. Hooking ItemAdded and ItemUpdated to assign a new task to the assigning user to either change the assignment or have the assignee added to the users with access to the site. Define a workflow which could be enabled for a list that would check if any new or modified task is assigned to users with

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

How to read Email Received to a SharePoint List

I have a email enabled Sharepoint list which can receive email. i am trying to write an evenhandler for the spemailreceiver class where i have to read the Email Body Content and grab some elements from that email body not the whole Body Content and add it to the List Field. IF the Body Content is : Name: John LastName:Johny i have to read John and Johny and populate it to a Neew List item with their fields Name= John and LastName= Johny. any ideas of reading the email body and grabbing the needed elements from it.....

Shared calendars and Exchange Web Services Managed API




there are many users and their e-mail addresses with calendars in our company. All the calendars are shared with one Exchange account, that means, by logging in with this special account, I can see in OWA all the users' calendars.


My problem is, that when I try to find appoitments of some of the shared calendars using EWS (Exchange Web Services) API, I always get just calendar of that special virtual user (created just for sharing).


Here is what I do:

ExchangeService service = new ExchangeService();

service.Credentials = new NetworkCredentials("myspecialaccount@domain.com", "password");

service.Url = "https://myexchangewebservicesurl";

CalendarFolder folder = CalendarFolder.Bind(service, WellKnownFolderName.Calendar);

now when I call folder.FindAppoitments I get only appoitments (actually I get nothing because the account has no appoitments) of the account I used in credentials, but I want to have an option to choose some of the shared calendar.


Does anyone know how to do that? Thank you very much..

Read old version of a document with excel services


In a version-control enabled document library full of excel spreadsheets (xlsx); I am trying to read values from it.

I have no problem with the latest document, (because I couldn't find anyway to reach the documents but the URL of them with OpenWorkbook method) the latest version's URL is simple like "http://spsite/excel library/file.xlsx" and the old version is like "http://spsite/_vti_history/512/excel library/file.xlsx".

And the old version cannot be opened and giving me the error:

The file that you selected could not be found. Check the spelling of the file name and verify that the location is correct 

Is there any way to deal with it and open. The same method can open spreadsheet and take the data from it, but when it comes to the old version it cannot find the file.

I think, there must be a permission issue on this thing for the old versions but I couldn't find anything.


Thanks in advance. I hope you guys can show me the light..

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.

reporting services 2008 email subscriptions

We recently converted from RS2005 to RS2008.  In RS2005 when our users subscribed to a report to be delivered by email, RS would automatically add the user name to the "To" field for report delivery.  The user would be added with the format "joe.smith" but without the domain (i.e. "@mycompany.com" ).  This worked fine and our users would get the reports emailed to them.

In RS2008, RS is also defaulting the "To" with the name portion of the email address "joe.smith" just like it did in RS2005.  However, this does not work in RS2008.  I get the following error

"Failure sending mail: At least one recipient is required, but none were found. Mail will not be resent."

Did we miss a configuration setting?  Or is this a change in how RS operates?


Email notifications from Approval workflow

I currently have an issue with an out-of-the-box workflow; in essence it relate to the workflow author/originator NOT receiving an update once an approval or rejection has been committed.

A task list has been set up to receive *status* updates everytime an workflow action is committed whether that be initiation/approval/rejection/completion.  Everything appears to work APART from completion and the issue of an email notification to the workflow owner.

I have checked the logs on the Sharepoint box itself and appear to be fine.

I have checked the logs on the Outbound SMTP server and everything is OK upto to the point of completion.

I need some advice on what else I can do/check to verify IF the email notifications are being created by SharePoint; what in the logs within Sharepoint I can further check (diagnostic is not set to verbose - ALL) and what ELSE can be checked on IIS/Outbound SMTP server...

Any advice would be much appreciated...

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.


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

Parsing an email from Exchange 2007+ from within a custom timer job.


Is this possible?

The exchange server is also set as the outgoing email server for the farm. It is in the same domain and located in the same subnet.... Technically its sitting on the sharepoint server.....physically.

if it is, how would I get that started? bascially I need to read the unread email, parse it and send pieces to a custom list in sharepoint. all I really need to know is how to connect to the email inbox i guess.

Retrieve Email Attachments from Exchange 2003


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.

Reporting Services Integrated mode 2008 R2 Subscription Email Error


I have setup report subscriptions delivered via email,  on Sharepoint and they tend to fail sending email randomly. It works most of the time, once or twice a week few subscriptions fail. Here is the detailed error message:

library!WindowsService_28!a74!05/18/2011-06:45:12:: w WARN: Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException: The report server has encountered a configuration error. Logon failed for the unattended execution account. ---> Microsoft.ReportingServices.Diagnostics.Utilities.LogonFailedException: Log on failed. Ensure the user name and password are correct. ---> System.ComponentModel.Win32Exception: The security database on the server does not have a computer account for this workstation trust relationship

library!WindowsService_28!550!05/18/2011-06:45:12:: i INFO: Schedule 7d92afd5-f5ac-4d65-adc8-d87a3aa4bef4 executed at 05/18/2011 06:45:12.

schedule!WindowsService_28!550!05/18/2011-06:45:12:: Creating Time based subscription notification for subscription: 7f035fad-44a1-4cd6-9d41-5465540c879d

Installing and Uninstalling Services

Installing and Uninstalling Services.Unlike most projects you create in Visual Studio .NET, Windows Service projects cannot be run directly from the development environment by pressing F5. This is because the service in the project must be installed before the project can run.

You can quickly install your service application by using a command line utility called InstallUtil.exe.
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