Fetching all mails in Inbox from Exchange Web Services Managed API and storing them as a .eml files

I want to fetch all mails in the Inbox folder using EWS Managed API and store them as .eml.
I can store file once I get the file content as a byte[] will
not be difficult, as I can do:
File.WriteAllBytes("c:\\mails\\"+mail.Subject+".eml",content);
The problem will be to fetch (1) all mails with (2)
all headers (like from, to, subject) (I am keeping information of those values of from, to and
other properties somewhere else, so I need them too) and (3)byte[]
EmailMessage.MimeContent.Content. Actually I am lacking understanding of
Microsoft.Exchange.WebServices.Data.ItemView,
Microsoft.Exchange.WebServices.Data.BasePropertySet and
Microsoft.Exchange.WebServices.Data.ItemSchema
thats why I am finding it difficult.
My primary code is:
When I create PropertySet as
follows:
PropertySet properties = new PropertySet(BasePropertySet.FirstClassProperties, ItemSchema.MimeContent);
I get following exception:
The property MimeContent can't be used in FindItem requests.
I dont understand
(Q1) What these ItemSchema and BasePropertySet are
(Q2) And how we are supposed to use them
So I removed ItemSchema.MimeContent:
PropertySet properties = new PropertySet(BasePropertySet.FirstClassProperties);
I wrote simple following code to get all mails in inbox:
ItemView view = new ItemView(50);
view.PropertySet = properties;
FindItemsResults<Item> findResults;
List<EmailMessage> emails = new List<EmailMessage>();
do
findResults = service.FindItems(WellKnownFolderName.Inbox, view);
foreach (var item in findResults.Items)
emails.Add((EmailMessage)item);
Console.WriteLine("Loop");
view.Offset = 50;
while (findResults.MoreAvailable);
Above I kept page size of ItemView to
50, to retrieve no more than 50 mails at a time, and then offsetting it by 50 to get next 50 mails if there are any. However it goes in infinite loop and continuously prints Loop on
console. So I must be understanding pagesize and offset wrong.
I want to understand
(Q3) what pagesize, offset and offsetbasepoint in ItemView constructor
means
(Q4) how they behave and
(Q5) how to use them to retrieve all mails in the inbox
I didnt found any article online nicely explaining these but just giving code samples. Will appreciate question-wise explanation despite it may turn long.

1) With FindItems it will only return a subset of Item properties see
http://msdn.microsoft.com/en-us/library/bb508824(v=exchg.80).aspx for a list and explanation. To get the mime content you need to use a GetItem (or Load) I would suggest you read
http://blogs.msdn.com/b/exchangedev/archive/2010/03/16/loading-properties-for-multiple-items-with-one-call-to-exchange-web-services.aspx which also covers of paging as well.
3) offset is from the base your setting the offset to 50 each time which means your only going to get the 50 items from the offset of 50 which just creates an infinite loop. You should use
view.Offset
= +50;
to increment the Offset although it safer to use
view.Offset  += findResults.Items.Count;
which increments the offset based on the result of the last FindItems operation.
5) try something like
ItemView iv = new ItemView(100, 0);
FindItemsResults<Item> firesults = null;
PropertySet psPropSet = new PropertySet(BasePropertySet.IdOnly);
iv.PropertySet = psPropSet;
PropertySet itItemPropSet = new PropertySet(BasePropertySet.IdOnly) { ItemSchema.MimeContent, ItemSchema.Subject, EmailMessageSchema.From };
do
firesults = service.FindItems(WellKnownFolderName.Inbox, iv);
service.LoadPropertiesForItems(firesults.Items, itItemPropSet);
foreach(Item itItem in firesults){
Object MimeContent = null;
if(itItem.TryGetProperty(ItemSchema.MimeContent,out MimeContent)){
Console.WriteLine("Processing : " + itItem.Subject);
iv.Offset += firesults.Items.Count;
} while (firesults.MoreAvailable);
Cheers
Glen
.Offset += fiFitems.Items.Count;

Similar Messages

  • Can't install Microsoft Exchange Web Services Managed API 2.0 - message says it is already installed but it is not.

    I tried to install the Microsoft Exchange Web Services Managed API 2.0 but I got a message saying it was already installed and that I should un-install it.  However it does not appear in the control panel un-install a program list.  I am using
    VS2013 on windows 8.  What can I do to get it to work?
    Mike VE

    Hello,
    Thank you for your sharing.
    If you have any feedback on our support, please click
    here
    Cara Chen
    TechNet Community Support

  • Exchange Web Service Managed API not authorizing

    I find it very strange that I am able to create appointments in my calendar on our company's exchange 2010 server
    using the asp.net 4.0 web application running on my XP machine which is not even part of the domain!, BUT when I upload the same code to our company's production Web application server
    (which is not same as the Exchange server), then I get the error as follows:
    System.Net.WebException: The remote server returned an error: (401) Unauthorized
    I am using Window's authentication throughout. Using service.UseDefaultCredentials = true; I just cannot
    afford to use the username/paasword for every staff who will be using this application. I am thinking there is some problem (rights/permissions/disabled impersonation) issue at the production Web application server (Windows 2008 m/c). I even played with the
    Application pool identity in IIS 7 by selecting all the builtin accounts it can possibly run under, but same error. I can clearly see that it is running under my Windows account right before the Appointment.Save() call
    is made. I am briefly impersonating using the logged in user's credentials and then removing the impersonation. I saw this technique elsewhere. But that doesn't make any difference either.
    These are the code files:
    Default.aspx.cs
    //(nothing much is going on in the markup page Default.aspx. Therefore not including)
    using System;
    using System.Collections.Generic;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using Microsoft.Exchange.WebServices.Data;
    using Microsoft.Exchange.WebServices.Autodiscover;
    using System.Web.Configuration;
    namespace TestExchangeWebServices
    public partial class _Default : System.Web.UI.Page
    protected ExchangeService service;
    protected void Page_Load(object sender, EventArgs e)
    service = new ExchangeService(ExchangeVersion.Exchange2010);
    service.UseDefaultCredentials = true;
    service.Url = new Uri(WebConfigurationManager.AppSettings["EWSURL"]);
    SetAppointment("Test", DateTime.Now, "Test");
    public void SetAppointment(string Subject, DateTime AptDateTime, string Body)
    Appointment apt = new Appointment(service);
    apt.Subject = Subject;
    apt.Body = Body;
    apt.Body.BodyType = BodyType.HTML;
    apt.Start = AptDateTime;
    apt.End = apt.Start.AddMinutes(30.00);
    apt.ReminderMinutesBeforeStart = 15;
    apt.IsReminderSet = true;
    HttpContext.Current.Trace.Write("Before Impersonation: System.Security.Principal.WindowsIdentity.GetCurrent().Name = " + System.Security.Principal.WindowsIdentity.GetCurrent().Name );
    System.Security.Principal.WindowsImpersonationContext impersonationContext;
    impersonationContext = ((System.Security.Principal.WindowsIdentity)HttpContext.Current.User.Identity).Impersonate();// //System.Threading.Thread.CurrentPrincipal.Identity
    HttpContext.Current.Trace.Write("Before Saving Appointment. System.Security.Principal.WindowsIdentity.GetCurrent().Name = " + System.Security.Principal.WindowsIdentity.GetCurrent().Name);
    //This is where the call is made and error occurs
    apt.Save(SendInvitationsMode.SendToNone);
    HttpContext.Current.Trace.Write("After Saving Appointment.");
    impersonationContext.Undo();
    Web.Config
    <?xml version="1.0"?>
    <configuration>
    <appSettings configProtectionProvider="RsaProtectedConfigurationProvider">
    <EncryptedData Type="http://www.w3.org/2001/04/xmlenc#Element"
    xmlns="http://www.w3.org/2001/04/xmlenc#">
    <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#tripledes-cbc" />
    <KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
    <EncryptedKey xmlns="http://www.w3.org/2001/04/xmlenc#">
    <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5" />
    <KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
    <KeyName>Rsa Key</KeyName>
    </KeyInfo>
    <CipherData>
    <CipherValue>0Sw7QiYFKoD65nCXfakXUhJrjapk4uyQ9u6aPBStxB1XBIIPtXbuZJZb/GyMxgl7Gi3sqIkoq66BKa+MSzjAkpkIfnZmOhMNVomKofC3rlEf9NeIAdCEvjcmENhfGyA6aEJj96mGDxRDBE/FP1iQ8Z3x8Rob+HG1sbD0YJy2rpA=</CipherValue>
    </CipherData>
    </EncryptedKey>
    </KeyInfo>
    <CipherData>
    <CipherValue>HmmlAzyuedvlQ/+grwRKjTs5Z7sg5dYShHFYsFcI0q2ugkZ7oYYNTTEycyqzKyXmaaqwyE2lAsApApSvT+JDys021+sMrqLrF37xAkjRimKbPTylgznRZLQx2qKAZstb6qIis2mcLykgURtp2ytfoPl83jJzEU1y6PtB0loB/p4=</CipherValue>
    </CipherData>
    </EncryptedData>
    </appSettings>
    <connectionStrings>
    <add name="ApplicationServices"
    connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true"
    providerName="System.Data.SqlClient" />
    </connectionStrings>
    <system.web>
    <identity impersonate="false"/>
    <customErrors mode="Off"></customErrors>
    <compilation debug="true" targetFramework="4.0" />
    <authentication mode="Windows">
    </authentication>
    <membership>
    <providers>
    <clear/>
    <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices"
    enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false"
    maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10"
    applicationName="/" />
    </providers>
    </membership>
    <profile>
    <providers>
    <clear/>
    <add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/"/>
    </providers>
    </profile>
    <roleManager enabled="false">
    <providers>
    <clear/>
    <add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ApplicationServices" applicationName="/" />
    <add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/" />
    </providers>
    </roleManager>
    </system.web>
    <system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>
    <httpErrors errorMode="Detailed" />
    <asp scriptErrorSentToBrowser="true"/>
    </system.webServer>
    </configuration>

    Glen, thanks for the response! I had already implemented a solution that is working for me as follows. Anyway your input is much appreciated.
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using Microsoft.Exchange.WebServices.Data;
    using Microsoft.Exchange.WebServices.Autodiscover;
    using System.Web.Configuration;
    //for impersonation before making calls
    using System.Security.Principal;
    using System.Web.Security;
    using System.Runtime.InteropServices;
    namespace TestExchangeWebServices
    public partial class _Default : System.Web.UI.Page
    protected ExchangeService service;
    //The following Impersonator*** variables are of the exchange account which has been configured to impersonate other users by enabling impersonation on the exchange server as they show at this link: http://msdn.microsoft.com/en-us/library/office/bb204095(v=exchg.140).aspx
    protected string ImpersonatorUsername = WebConfigurationManager.AppSettings["ImpersonatorUsername"];
    protected string ImpersonatorPassword = WebConfigurationManager.AppSettings["ImpersonatorPassword"];
    protected string ImpersonatorDomain = WebConfigurationManager.AppSettings["ImpersonatorDomain"];
    // This is for the user for whom the appointment need to be set on their exchange server. This user will be impersonated by the above impersonator. You do not need to get the password information for this user, just the email address will work.
    private string Username = HttpContext.Current.User.Identity.Name.Split('\\').Last(); //extract the username out of the "Domain\Username" format. It doesn't have to be the currently logged in user. As per your need you can use the username of any other company user for whom you know the email address.
    protected string ImpersonatedEmailAddress ;//= Username +"@"+ WebConfigurationManager.AppSettings["EmailDomain"];
    //start impersonation setup block. Credits: Impersonate a Specific User in Code http://support.microsoft.com/kb/306158#4
    public const int LOGON32_LOGON_INTERACTIVE = 2;
    public const int LOGON32_PROVIDER_DEFAULT = 0;
    WindowsImpersonationContext impersonationContext;
    [DllImport("advapi32.dll")]
    public static extern int LogonUserA(String lpszUserName,
    String lpszDomain,
    String lpszPassword,
    int dwLogonType,
    int dwLogonProvider,
    ref IntPtr phToken);
    [DllImport("advapi32.dll", CharSet = CharSet.Auto, SetLastError = true)]
    public static extern int DuplicateToken(IntPtr hToken,
    int impersonationLevel,
    ref IntPtr hNewToken);
    [DllImport("advapi32.dll", CharSet = CharSet.Auto, SetLastError = true)]
    public static extern bool RevertToSelf();
    [DllImport("kernel32.dll", CharSet = CharSet.Auto)]
    public static extern bool CloseHandle(IntPtr handle);
    //end impersonation setup block;
    protected void Page_Load(object sender, EventArgs e)
    ImpersonatedEmailAddress = Username + "@" + WebConfigurationManager.AppSettings["EmailDomain"]; //form the email address out of the username, provided they both are same
    service = new ExchangeService(ExchangeVersion.Exchange2010);
    //service.UseDefaultCredentials = true;
    service.Credentials = new WebCredentials(ImpersonatorUsername, ImpersonatorPassword, ImpersonatorDomain);
    service.Url = new Uri(WebConfigurationManager.AppSettings["EWSURL"]);
    service.ImpersonatedUserId = new ImpersonatedUserId(ConnectingIdType.SmtpAddress, ImpersonatedEmailAddress);
    SetAppointment("Test", DateTime.Now, "Test");
    public void SetAppointment(string Subject, DateTime AptDateTime, string Body)
    Appointment apt = new Appointment(service);
    apt.Subject = Subject;
    apt.Body = Body;
    apt.Body.BodyType = BodyType.HTML;
    apt.Start = AptDateTime;
    apt.End = apt.Start.AddMinutes(30.00);
    apt.ReminderMinutesBeforeStart = 15;
    apt.IsReminderSet = true;
    if (impersonateValidUser(ImpersonatorUsername, ImpersonatorDomain, ImpersonatorPassword)) //For this code to work you will have to enable impersonation on the Exchange server. This code works on the web application running on the company server, but not from my XP PC that is not part of the domain but is on VPN connection.
    HttpContext.Current.Trace.Write("Before Saving Appointment. System.Security.Principal.WindowsIdentity.GetCurrent().Name = " + System.Security.Principal.WindowsIdentity.GetCurrent().Name);
    apt.Save(SendInvitationsMode.SendToNone);
    HttpContext.Current.Trace.Write("After Saving Appointment.");
    Label1.Text = String.Format("Appointment set successfully for {0}", ImpersonatedEmailAddress);
    else //fall back to the code that uses logged in user's window identity and not impersonation. This code "strangely" worked from the web application installed on my Windows XP PC that was not part of the domain but was on VPN connection and yet saved appointments on the company's exchange server. I guess, the VPN connection compensates for all the mumbo-jumbo round about impersonation code in the impersonateValidUser method. Hack, this code worked even I had not configured the impersonation on the exchange server as they tell you to do at this link: http://msdn.microsoft.com/en-us/library/office/bb204095(v=exchg.140).aspx
    service.Credentials = null;
    service.ImpersonatedUserId = null;
    service.UseDefaultCredentials = true;
    HttpContext.Current.Trace.Write("Before Impersonation: System.Security.Principal.WindowsIdentity.GetCurrent().Name = " + System.Security.Principal.WindowsIdentity.GetCurrent().Name);
    //this is not impersonation. It uses the logged in user's window identity. The window identity does not have to be that of the company domain. The windows identity of Local PC that is not part of the domain will also work
    System.Security.Principal.WindowsImpersonationContext impersonationContext;
    impersonationContext = ((System.Security.Principal.WindowsIdentity)HttpContext.Current.User.Identity).Impersonate();// //System.Threading.Thread.CurrentPrincipal.Identity
    HttpContext.Current.Trace.Write("Before Saving Appointment. System.Security.Principal.WindowsIdentity.GetCurrent().Name = " + System.Security.Principal.WindowsIdentity.GetCurrent().Name);
    apt.Save(SendInvitationsMode.SendToNone);
    impersonationContext.Undo();
    //impersonation methods. Credit: Impersonate a Specific User in Code: http://support.microsoft.com/kb/306158#4
    private bool impersonateValidUser(String userName, String domain, String password)
    WindowsIdentity tempWindowsIdentity;
    IntPtr token = IntPtr.Zero;
    IntPtr tokenDuplicate = IntPtr.Zero;
    if (RevertToSelf())
    if (LogonUserA(userName, domain, password, LOGON32_LOGON_INTERACTIVE,
    LOGON32_PROVIDER_DEFAULT, ref token) != 0)
    if (DuplicateToken(token, 2, ref tokenDuplicate) != 0)
    tempWindowsIdentity = new WindowsIdentity(tokenDuplicate);
    impersonationContext = tempWindowsIdentity.Impersonate();
    if (impersonationContext != null)
    CloseHandle(token);
    CloseHandle(tokenDuplicate);
    return true;
    if (token != IntPtr.Zero)
    CloseHandle(token);
    if (tokenDuplicate != IntPtr.Zero)
    CloseHandle(tokenDuplicate);
    return false;
    private void undoImpersonation()
    impersonationContext.Undo();
     

  • ConversationId property vs ConversationIndex property in Exchange Web Services managed API

    EWS Managed API have two properties:ConversaionId and ConversationIndex
    What is the difference between them? I guess ConversationId is
    the the ConversationIndex of
    the first mail in the conversation which is essentially of 22 bytes, while ConversationIndex is
    the index of that particular reply in the conversation thread, essentially of 22 bytes + multiples of 5 bytes for each reply in the conversation. Is it like that?
    Also ConversationId is
    accessible only with Exchange Server 2010 onwards. So cant we access ConversationId in
    the Exchange Server 2007?

    I just found this thread that indicates that you can use an extended property definition to access the ConversationId in Exchange 2007. Very smart!
    http://stackoverflow.com/questions/7487570/implementing-outlook-2010s-group-by-conversation-using-ews-and-exchange-2007
    Henning's answer:
    You can fetch the ConversationId and the ConversationIndex via extended properties:
    private static readonly ExtendedPropertyDefinition ConversationIdProperty = new ExtendedPropertyDefinition(0x3013, MapiPropertyType.Binary);
    private static readonly ExtendedPropertyDefinition ConversationIndexProperty = new ExtendedPropertyDefinition(0x0071, MapiPropertyType.Binary);
    var items = service.FindItems(WellKnownFolderName.Inbox, new ItemView(512) { PropertySet = new PropertySet(BasePropertySet.FirstClassProperties,
    ConversationIdProperty, ConversationIndexProperty)});
    Both are binary properties. Their content is described in great detail here:
    [MS-OXOMSG]: E-Mail Object Protocol Specification, section 2.2.1.2 and 2.2.1.3.
    The properties themselves are defined in
    [MS-OXPROPS]: Exchange Server Protocols Master Property List.

  • Web Services Managed API

    Hey,
    I'm trying to expose some Exchange stuff through my .NET web site. It's not working because I want to use the logged in users credentials but this fails. If I hard code a username and password all is well.
    My setup is:
    Client > IIS 7.5 Server > Exchange 2010 Server
    I know it's to do with Kerberos, but I cannot figure out where it's failing. I've setup SPNs on the Exchange server, and enable delegation on the IIS computer account in AD.
    I have this working perfectly for IIS Server > SQL Server using a domain service account for SQL, so Kerberos itself appears to be sound. Same Web site, same IIS Server I'm trying to use for Exchange Web Services.
    public void SendEmail_Click(object sender, EventArgs e)
    try
    ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010_SP2);
    service.UseDefaultCredentials = true;
    service.AutodiscoverUrl("[email protected]");
    EmailMessage message = new EmailMessage(service);
    message.Subject = EmailSub_TextBox.Text;
    message.Body = EmailBod_TextBox.Text;
    message.ToRecipients.Add(EmailTo_TextBox.Text);
    message.Attachments.AddFileAttachment(String.Format("{0}", FileName), Server.MapPath(String.Format("{0}", FileUrl)));
    message.Save();
    message.SendAndSaveCopy();
    catch (Exception ex)
    Info_Label.Text += String.Concat(ex.Message.ToString(), "<br />");
    Info_Label.Visible = true;
    This returns this error, when for example sending an email (as per above code):
    When making a request as an account that does not have a mailbox, you must specify the mailbox primary SMTP address for any distinguished folder Ids.
    The message sender (me) does have a valid mailbox!
    Thanks.
    PS: I have a single server Exchange environment.

    Thanks Glen.
    Will do. If I get anything from the IIS forum I'll post back here, in case anyone stumbles across it.
    One final question: what, in reality, is the difference between these:
    service.UseDefaultCredentials = true;
    service.Credentials = CredentialCache.DefaultNetworkCredentials;
    As they both work.

  • Grabbing numbers from an array of type double and outputting them into a text file

    In a program im creating i need to save some coordinates of a micropositioner i have into a text file,
    I have the coordinates saved into an array that has 6 digits of precision (6 places after the decimal point).
    I use the number to string conversion and wire that into the write to text file function in labview.  When i open the file
    the numbers that are only displayed are the ones to the left of the decimal point.  I know the number to decimal string function
    rounds the values so if i were to input 3.111111 it would only output the string "3" instead of "3.111111" . 
    So to get all the digits onto the file without rounding i multiplied the number by 10^6 but the decimal point will be lost at that point.
    Is there anyway i can convert numbers into strings without labview rounding to the nearest whole number also without having to multiply by 10^6 and without having to expect the user to know that the coordinates saved in a file are multiplied by an order of magnitude of a million ? 

    ed oh i guess i just missed that function on the pallete after i saw that the function went from number to hex, octal, etc. i assumed that the rest on that row would be some sort of conversion to a different base number, haha thanks.

  • What is the use of HFM workspace and Web service manager?

    Hi experts,
    Can any one explain me the difference between Hyperion Workspace - Agent Service and
    HFM-Web service manager?
    And how these services usefull for HFM workspace?
    Thanks
    Chandu

    Hi Chandu,
    I would recommend you take a look at the Oracle Hyperion Enterprise Performance Management System Installation and Configuration Guide. It has all the answers to your questions. Here is the link:
    http://docs.oracle.com/cd/E17236_01/epm.1112/epm_install_11121/launch.html
    Cheers,
    Mehmet

  • ERMS: Inbound mails are not displaying in Agent inbox from IC web

    Hi Experts,
                       We are implementing ERMS solution.. in CRM 2007 system. I am not able find the inbound mails in Agent inbox. I have done the below settings..
    1. Mail settings has done by BASIS team and whenever i sent a mail to ( cust@example) from my out look i can see the mail in SCOTT.
    2. I have done the inbound distribution for the mail id customer@example to ERMS support2 BOR object
    3. I have followed the rest of the steps from  "ERMS_How_to_guide " document.Hope all the set up inplace according to the document.
    Pleasse provide me some inputs what may be the reason for not displaying the e-mail in Agent inbox from IC web. Thanks
    Regards,
    Lakshmana.P

    Dear Loy,
                     I have checked the org unit settings in CRM_ERMS_WF_CUST and its fine.  I have checked the E-Mail work bench from IC_Manager role and i could find the mail which i have sent with the status 'In Que'. If i go inside by clicking the hyper link of the mail which is received into the inbox i could find the below mentioned log.....
    History
    Processing policy DEFAULT
    Reading policy:DEFAULT, context:ERMS, variant:DF5E7293EB4DCAF1A06F001CC4A95D40
    Processing rule container Default ( DF699C3B335A43F1A06F001CC4A95D40 )
    Processing rule ( DF699C3B335A44F1A06F001CC4A95D40 )
    Uncompiled Rule: ORDF699BD5A68602F1A06F001CC4A95D40892ED53F41EDBB56E10000000A1550DECONTAINSCompiled Rule: xpath address:/parts/EMAIL/EMAIL_CONTENT/text()
    xpath value:invoice test Regards, Laxman ________________________________________________________________________ __________________ A/S, parken 40-42, UK-2750
    Rule evaluates to TRUE
    action added: ROUTE ( GROUP = S:50000025 ) CREATEIR ( DESCRIPTION = ERMS IR )
    BOR: returned from Service Manager
    Kindly provide your inputs what may be the reason not to get inbound mails into IC agent inbox. Thanks
    Regards,
    Lakshmana.P

  • Mail Connection Failures And EWS (Exchange Web Service) Errors

    Hi,
    I upgraded from Leopard to Snow Leopard on Friday, and was able to set up my Mail, iCal, and Address Book very quickly and easily. Everything has been working great until today, when I experienced an issue with emails with attachments. The company I work for uses Exchange 2007 hosted on Rackspace.
    When sending an email with attachments, I sporadically receive a connection error. This is the same error that I usually get if a server goes offline or I lose my Internet connection - the one where you get the choice to either try again, send later, or use another server to send the email. I will receive this error over and over, and can then send an email with attachments a few minutes later without issue, so it is definitely a sporadic problem. I have not had this issue with emails that did not contain attachments. On at least one occasion, an email with attachments was delivered to the recipient successfully but failed to show up in my Sent Items either in Mail or on the Exchange Server's web mail client.
    Rackspace was unable to diagnose the issue, but they have had several reports of the same problem. I looked in the console and saw several errors logged by Mail, all which appeared to happen around the same times that I had the connection failures for the messages with attachments.
    8/31/09 1:17:00 PM Mail[1764] Error (null) occurred while trying to append messages to outgoing store. Ignoring and proceeding with delivery...
    8/31/09 1:57:06 PM Mail[1764] Error (null) occurred while trying to append messages to outgoing store. Ignoring and proceeding with delivery...
    8/31/09 2:32:14 PM Mail[1764] Error Error Domain=MFEWSErrorDomain Code=56 UserInfo=0x1179aa6f0 "The operation couldn’t be completed. (MFEWSErrorDomain error 56.)" occurred while trying to append messages to outgoing store. Ignoring and proceeding with delivery...
    8/31/09 2:44:21 PM Mail[1764] Error Error Domain=MFEWSErrorDomain Code=56 UserInfo=0x116c0aa40 "The operation couldn’t be completed. (MFEWSErrorDomain error 56.)" occurred while trying to append messages to outgoing store. Ignoring and proceeding with delivery...
    8/31/09 3:19:59 PM Mail[4279] * Assertion failure in -[ComposeBackEnd setAccount:], /SourceCache/Mail/Mail-1075/Compose.subproj/ComposeBackEnd.m:1522
    ComposeBackEnd does not support explicitly setting an account
    0 Message 0x00007fff876aa880 -[MFAssertionHandler _handleFailureWithPreamble:description:arguments:] + 137
    1 Message 0x00007fff876aa7e5 -[MFAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 220
    2 Mail 0x00000001001442ec 0x0 + 4296295148
    3 Foundation 0x00007fff86ab9722 _NSSetObjectValueAndNotify + 258
    4 Mail 0x00000001001428da 0x0 + 4296288474
    5 CoreFoundation 0x00007fff87aae35c _invoking__ + 140
    6 CoreFoundation 0x00007fff87aae22d -[NSInvocation invoke] + 141
    7 Message 0x00007fff874ee0aa -[ThrowingInvocationOperation main] + 31
    8 Message 0x00007fff874ed9ea -[_MFInvocationOperation main] + 275
    9 Foundation 0x00007fff86ac611a -[__NSOperationInternal start] + 673
    10 Foundation 0x00007fff86ac5dd8 ___startOperations_block_invoke2 + 99
    11 libSystem.B.dylib 0x00007fff82515dc7 dispatch_call_block_andrelease + 15
    12 libSystem.B.dylib 0x00007fff824f4341 dispatch_workerthread2 + 231
    13 libSystem.B.dylib 0x00007fff824f3c80 pthreadwqthread + 353
    14 libSystem.B.dylib 0x00007fff824f3b1d start_wqthread + 13
    8/31/09 3:20:36 PM Mail[4279] * Assertion failure in -[ComposeBackEnd setAccount:], /SourceCache/Mail/Mail-1075/Compose.subproj/ComposeBackEnd.m:1522
    ComposeBackEnd does not support explicitly setting an account
    0 Message 0x00007fff876aa880 -[MFAssertionHandler _handleFailureWithPreamble:description:arguments:] + 137
    1 Message 0x00007fff876aa7e5 -[MFAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 220
    2 Mail 0x00000001001442ec 0x0 + 4296295148
    3 Foundation 0x00007fff86ab9722 _NSSetObjectValueAndNotify + 258
    4 Mail 0x00000001001428da 0x0 + 4296288474
    5 CoreFoundation 0x00007fff87aae35c _invoking__ + 140
    6 CoreFoundation 0x00007fff87aae22d -[NSInvocation invoke] + 141
    7 Message 0x00007fff874ee0aa -[ThrowingInvocationOperation main] + 31
    8 Message 0x00007fff874ed9ea -[_MFInvocationOperation main] + 275
    9 Foundation 0x00007fff86ac611a -[__NSOperationInternal start] + 673
    10 Foundation 0x00007fff86ac5dd8 ___startOperations_block_invoke2 + 99
    11 libSystem.B.dylib 0x00007fff82515dc7 dispatch_call_block_andrelease + 15
    12 libSystem.B.dylib 0x00007fff824f4341 dispatch_workerthread2 + 231
    13 libSystem.B.dylib 0x00007fff824f3c80 pthreadwqthread + 353
    14 libSystem.B.dylib 0x00007fff824f3b1d start_wqthread + 13
    8/31/09 3:49:26 PM Mail[4279] * Assertion failure in -[EWSDelivery deliverSynchronously], /SourceCache/Message/Message-1075.2/Delivery.subproj/EWSDelivery.m:84
    EWSDelivery doesn't have an EWSAccount, got (null) instead
    0 Message 0x00007fff876aa880 -[MFAssertionHandler _handleFailureWithPreamble:description:arguments:] + 137
    1 Message 0x00007fff876aa7e5 -[MFAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 220
    2 Message 0x00007fff875f51e9 -[EWSDelivery deliverSynchronously] + 861
    3 Mail 0x000000010007d120 0x0 + 4295479584
    4 Mail 0x000000010007cc38 0x0 + 4295478328
    5 CoreFoundation 0x00007fff87aae35c _invoking__ + 140
    6 CoreFoundation 0x00007fff87aae22d -[NSInvocation invoke] + 141
    7 Message 0x00007fff87506b51 -[MonitoredInvocation invoke] + 214
    8 Message 0x00007fff874ee0aa -[ThrowingInvocationOperation main] + 31
    9 Message 0x00007fff874ed9ea -[_MFInvocationOperation main] + 275
    10 Foundation 0x00007fff86ac611a -[__NSOperationInternal start] + 673
    11 Foundation 0x00007fff86ac5dd8 ___startOperations_block_invoke2 + 99
    12 libSystem.B.dylib 0x00007fff82515dc7 dispatch_call_block_andrelease + 15
    13 libSystem.B.dylib 0x00007fff824f4341 dispatch_workerthread2 + 231
    14 libSystem.B.dylib 0x00007fff824f3c80 pthreadwqthread + 353
    15 libSystem.B.dylib 0x00007fff824f3b1d start_wqthread + 13
    8/31/09 4:00:06 PM Mail[4279] * Assertion failure in -[ComposeBackEnd setAccount:], /SourceCache/Mail/Mail-1075/Compose.subproj/ComposeBackEnd.m:1522
    ComposeBackEnd does not support explicitly setting an account
    0 Message 0x00007fff876aa880 -[MFAssertionHandler _handleFailureWithPreamble:description:arguments:] + 137
    1 Message 0x00007fff876aa7e5 -[MFAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 220
    2 Mail 0x00000001001442ec 0x0 + 4296295148
    3 Foundation 0x00007fff86ab9722 _NSSetObjectValueAndNotify + 258
    4 Mail 0x00000001001428da 0x0 + 4296288474
    5 CoreFoundation 0x00007fff87aae35c _invoking__ + 140
    6 CoreFoundation 0x00007fff87aae22d -[NSInvocation invoke] + 141
    7 Message 0x00007fff874ee0aa -[ThrowingInvocationOperation main] + 31
    8 Message 0x00007fff874ed9ea -[_MFInvocationOperation main] + 275
    9 Foundation 0x00007fff86ac611a -[__NSOperationInternal start] + 673
    10 Foundation 0x00007fff86ac5dd8 ___startOperations_block_invoke2 + 99
    11 libSystem.B.dylib 0x00007fff82515dc7 dispatch_call_block_andrelease + 15
    12 libSystem.B.dylib 0x00007fff824f4341 dispatch_workerthread2 + 231
    13 libSystem.B.dylib 0x00007fff824f3c80 pthreadwqthread + 353
    14 libSystem.B.dylib 0x00007fff824f3b1d start_wqthread + 13
    Just wanted to report this issue in case this is something that other people are experiencing, and to see if Apple's engineers could look in to it. There is a simple workaround, which is to set up a regular SMTP server as the outgoing mail server for the Exchange account, and to use this instead of the outgoing Exchange server set up by Snow Leopard.
    Thanks,
    - max

    Hi MangeshDD,
    Some other information for you:
    Understanding Exchange Web Services Virtual Directories
    If you still have other confused points, please feel free let us know.
    Regards!
    Gavin
    TechNet Community Support

  • Mail box behaviour is not okay using gmail. All mails in INBOX gets replicated in Trash. This is a recent phenomenon. Not clear where the problem lies - in Gmail or in new OS in MAC.

    I use MAC Mail box for my gmail account. In the last one month or so, my gmail behaviour is erratic.  When I tyrpe mails and send, a spate of intermediate version gets stored as draft in TRASH forcing these to be manually deleted.
    Another new issue: All INBOX Mails appear now in TRASH also.  If I delete, Trash contents, I lost all mail in INBOX also. I re-created my INBOX content from Archive Mail box. Then all mails appear in TRASH folder alaso.
    I am not sure where the problem lies - Is it an issue of Gamil, or new Maverick OS that I use in my MACPRO.  This was never before say one or two months before.
    The situation is distrubing and please advice whether I should reset any configuration.
    Regards
    Venkat

    I removed all mails sitting in Trash this time by using DELETE command; and then again clicked "REBUILD".  Now the Trash is empty.   I hope the problem is resolved for now. Thanks for the tips given instantly. Venkat

  • Exchange Web Services are not currently available for this request because none of the Client Access Servers in the destination site could process the request.

    Hi,
    I am using EWS Java APIs and passing OAuth tokens to fetch data from office 365 mailboxes.
    Because I am developing Web APIs I preferred using "Application Permissions" defined in Azure active directory application for Office 365, and used "client credential flow" OAuth flow to fetch OAuth token specific to application which will
    allow "Have full access via EWS to all mailboxes in the organisation".
    After fetching token with the procedure specified in the document "http://blogs.msdn.com/b/exchangedev/archive/2015/01/21/building-demon-or-service-apps-with-office-365-mail-calendar-and-contacts-apis-oauth2-client-credential-flow.aspx"
    I passed this token to EWS Java APIs,
    it gave me error saying:
    microsoft.exchange.webservices.data.ServiceResponseException: Exchange Web Services are not currently available for this request because none of the Client Access Servers in the destination site could process the request.
    I tried similar thing with EWS managed APIs for .net. Got similar error.
    Can anyone provide some help and direction to resolve this error.
    Thanks & Best Regards,
    Pranjal

    I see you found an answer with the X-AnchorMailbox header on StackOverflow:
    http://stackoverflow.com/questions/29554724/exchange-web-services-are-not-currently-available-for-this-request-because-none

  • Slow attachment upload with Exchange Web Services (Outlook 2011 for Mac?)

    We're experiencing slow attachment upload with Exchange Web Services versus MAPI, OWA, and Outlook Anywhere.  I'm not totally certain that it is Exchange Web Services or specifically Outlook 2011 for Mac.  I attempted to test with the Mac Mail
    App, but it makes it difficult to tell when the attachment has been uploaded and the file has been sent.  Here's what we're seeing (10mb file):
    MAPI / RPC/HTTPS / OWA: 10-15 seconds upload time
    Exchange Web Services (Outlook 2011 for Mac): 60-90 seconds upload time
    Thoughts? Any idea why we would see such a drastic difference in attachment upload time?  Any way to prove definitively that it is Exchange Web Services vs. Outlook 2011 for Mac?  We've tried it from multiple locations with multiple different machines,
    and although the upload times vary (some locations have more bandwidth etc) the ratios remain similar.

     
    Hi ,
    Does all the user occurred the issue ?
    If only special user, I recommend you do the following steps and test:
    1.Remove and re-add the email account and check if this helps to resolve the issue.
    To remove and add the email accounts:
    Open Outlook > GO to Tools > Accounts > Click on "Minus" symbol to remove and "Plus" to add an Email account.
    2.Creating a new user profile:
    http://support.microsoft.com/kb/2439218/
    3. If the issue persists, rebuild the data base and check the results:
    http://support.microsoft.com/kb/2360509
    You can also post it on Office for MAC forum  to get special support about the difference between Outlook and Outlook for MAC.
    http://www.microsoft.com/mac/support
    Wendy Liu
    TechNet Community Support

  • Exchange Web Services (EWS) - InvalidCastException

    I have a service that reads the new emails in an Office 365 Exchange mailbox, and saves attachments in a directory.
    For most emails it runs well, however I'm getting a lot of the following exceptions lately:
    System.InvalidCastException: Unable to cast object of type 'Microsoft.Exchange.WebServices.Data.ItemAttachment' to type 'Microsoft.Exchange.WebServices.Data.FileAttachment'
    I will post a piece of my code, could anyone please have a look and tell me what I need to change? It's .NET 4.0, Visual Studio 2010, Visual Basic and the latest Exchange Web Services api, 2.2.
    Dim sf As SearchFilter = New SearchFilter.SearchFilterCollection(LogicalOperator.And, New SearchFilter.IsEqualTo(EmailMessageSchema.IsRead, False))
    Dim findResults As FindItemsResults(Of Item) = service.FindItems(WellKnownFolderName.Inbox, sf, New ItemView(128))
    If findResults.Count > 0 Then
    Dim items As ServiceResponseCollection(Of GetItemResponse) =
    service.BindToItems(findResults.Select(Function(item) item.Id),
    New PropertySet(BasePropertySet.FirstClassProperties, EmailMessageSchema.From, EmailMessageSchema.Sender, EmailMessageSchema.ToRecipients, EmailMessageSchema.IsRead))
    For Each itItem As Microsoft.Exchange.WebServices.Data.Item In findResults.Items
    If TypeOf itItem Is EmailMessage Then
    Dim mailItem As EmailMessage = DirectCast(itItem, EmailMessage)
    If itItem.HasAttachments Then
    itItem.Load()
    For Each Attachment In itItem.Attachments
    If TypeOf Attachment Is FileAttachment Then
    Dim fa As FileAttachment = itItem.Attachments(0)
    pathAttachment = "c:\temp\" & fa.name 'not actual code, but to make this code readable and to the point
    Try
    fa.Load(pathAttachment) 'save file

    It looks like you've hardcoded to always access the first attachment, when really you want to access the current attachment in the For Each loop. (Unless my VB skills are rusty, which is definitely possible!)
    Dim fa As FileAttachment = itItem.Attachments(0)

  • Entourage for Exchange Web Services Beta

    Anyone have any experience with this? And if you do, have you gotten it to work? Our email people have me testing it out and it connects but doesn't pull any mail or let me send anything.
    Apple Mail works fine, but I have a lot of clients who like to use Entourage for all the scheduling capabilities.
    Thanks!

    http://www.microsoft.com/mac/itpros/entourage-ews.mspx
    says:
    (User must connect to Microsoft Exchange Server 2007 Service Pack 1 with Update Rollup 4 or later. (Caution: If you are using earlier versions of Exchange Server with Entourage, we recommend that you do not install this beta edition of Entourage for Exchange Web Services.)
    One has to wonder if that element is missing in your setup.

  • I can't figure out data binding from a web service.

    Hi,
    I've been trying to figure out how to connect a TreeTable control with data from a non-SAP web server. Here's what I have so far;
        I have a sample program that uses json in a variable called oData.
        I have a TreeTable control named oTable.
        I create a model;
            var oModel = new sap.ui.model.json.JSONModel();
        I feed the oData variable into it;
            oModel.setData(oData);
        Finally, I feed the oModel to the oTable;
            oTable.setModel(oModel);
    That all makes sense. What I want to do is get the data from a web service. The only examples I've been able to find show how to configure an SAP data service and then connect to that. They don't give any details of the format that the SAP data service is sending. I don't have access to an SAP system so I can't set one up to reverse-engineer the data. I'm going to be writting my own oData service for this so I need a couple of things;
        1. An example of json or xml data as it's sent from a web server.
        2. An example of how you pull that data from the web service to an SAP ui model.
    I could really use some help. I haven't been able to find any examples that make sense to me.

    Hi Joe
    Here is an small example. Maybe it is useful to you.
    In this example, I  bind the tree to /root and you can see that we have 0: 1: elements under each element recursively.
    Thanks
    -D

Maybe you are looking for