[E2010] [EWS] [C#] [Windows 2008 R2]: Sent Items flolder when sending a message with impersonation

I've seen a number of questions like this one, but no really good answers.
I have a requirement to send an e-mail message using Exchange using impersonation. The message must appear in the impersonated user's "Sent Items" folder after the message is sent.
I'm able to send the e-mails OK, but I'm unable to get them to show up in the user's Sent Items folder. I'm calling message.SendAndSaveCopy to send the mail.
Any tips would be appreciated.
Bryan Slatner

You might want to post the whole code fragment your using including the way your using impersonation.
Also have you tried just using the overload to specify the folder the message should be saved in eg
FolderId fldid = new FolderId(WellKnownFolderName.SentItems,"[email protected]");
email.SendAndSaveCopy(fldid);
Cheers
Glen

Similar Messages

  • When I send an email with Mail, I often confuse the account which I'm using. The result is that I send a message with the wrong account! Is there a way to avoid this (for example a reminder before the email is sent)?

    When I send an email with Mail, I often confuse the account which I'm using. The result is that I send a message with the wrong account! Is there a way to avoid this (for example a reminder before the email is sent)?

    Hi, thanks for the answer, I did that already. Unfortunatly this doesn't help me at all, as I often forget to check the menu. For me composing the message is writing the text, the subject, the person to who is addressed and than press "send".
    I often forget to check the "from", and this is a problem because the software select itself one of the accounts.
    Isn't there a way at least to put as a default a blank field instead of one of the accounts? or an account which doesn't work so if I forget to specify the "from" I will be rnotofied that the message can't be sent.
    I guess this could be a rather common problem for many people!
    Thanks
    Sergio

  • HT5622 Why can I send a message with an attached photo to one contact on phone or email and can't to another contact. I can sent message on iPhone still I was using messages on iPad

    Why can I send message on iPad messages to one contact and not send same message with same photo to another contact. I can sent message on iPhone to same contact

    I would guess that the problem contact does not have iMessage turned on. The iPad can only send iMessages not SMS messages (phone text). You can send a message to this contact with your iPhone because your iPhone can send SMS text messages.

  • When sending large messages through iMail, they disappear from the Sent fol

    This is a peculiar problem that we only see with our (only) Mac/iMail user. The client is iMail that uses IMAP/SMTP to comm with our Exchange server. The iMail user is able to send and receive email just fine. However, we just noticed that whenever he sends messages with large attachments (at least a couple of MB), the messages appear briefly in his Sent folder but then immediately disappear. We do know that the recipients receive the message. We did not find any rules in iMail that would cause that to happen, and the Exchanger server is not setup to do anything with messages based on size. We can send a message with the same attachments (and resulting size) from Outlook and Thunderbird clients, and the message stays in the Sent folders in those.
    Thanks for any advice
    MJ

    I'm not sure if this is the same problem, but I'd also welcome advice: I'm trying to send an email via Mail, with quite a large attachment. I've made a .zip file of it to try to save space; however, when I click on 'Send', it appears in my Outbox - but never makes it into the Send box.
    I can't fathom why this would be - if anyone has any suggestions - especially for how to send this thing! it's quite urgent! - I'd be really grateful.

  • Sent items on yahoo Imap not synchronising with sent items on yahoo mail outlook 2011

    I had a problem where the my yahoo imap  which I set up with Outlook 2011 was not synchronizing with Yahoo from the web.
    I found the solution today by switching from Sent items( Server) to Sent( Server).
    1. Go to tools
    2. Accounts
    3.Advance options
    4. Folders
    5. Then you will see sent. Drop down the window and you will see what I have shown in the screen shot below.
    It worked for me and now all my emails are synchronising very well.

    the last sentence should read...."this folder do however only have the sent emails that was sent from my imac, and not the emails that was sent from my ipad".
    I want all my sent items on all my devices the same, in other words the should come from the server and not the specific device I'm using

  • Windows 2008 R2 SP1 (64bit) shared folders no longer work with Windows 7 Pro but do work with WindowsXP & Windows 2003

    As of last week, our Windows 7 Pro workstations can not map or browse the Windows 2008 Server shares. They can ping the Windows 2008 server. The Windows 7 Pro machines can still access the Windows 2003 Server Shares. The older workstations running Windows
    XP can still map to the both the Windows 2003 & Windows 2008 Servers. All the servers can browse to each others shared folders (2 windows 2003 server & 1 windows 2008 server). 

    Ok, now you're down to network or permissions issues. An unedited ipconfig /all
    of server and problem workstation may help. You could also try setting up some auditing.
    https://technet.microsoft.com/en-us/library/dn311489.aspx
    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows]
    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

  • Windows 2008 R2 Folder assign permission "Read and Write" problem with *.doc file

    Hello All,
    I am a new one here,
    I am sorry for any mistakes and also my english is so poor.
    M Brother company runing Windows 2008 R2 as Active Directory...
    We have folder Name: Admin
    and in this folder, there are alot documents files as : *.doc, *.dwg, *.txt etc.....
    All user accesing to these files and they can open to edit and save...
    One day my brother want me to set Admin folder for all users just"Read and Write.." mean they still can open files to edit and save... but can't delete..
    I did success with this..
    But only one thing happen.. when they open *.doc file to edit and attempting to save, the message alert" access denide " and they can only "SAVE AS"...We don't want "Save as"
    Could you show me how can we fix error with *.doc file while they trying to save? because it allow only save as.. but other files as *.text file or *.dwg they can save without problem..
    Could expert here ever face this issues and fix by yourself, please share me with this..
    Please help me..
    Best regards,

    Hi,
    Office programs are specific. They will create a temp file when edit, then the temp file will be deleted when close. So Delete permission is needed for users to saving Office files like Excel/Word.
    For more detaile information, please refer to the thread below:
    Special Permissions - User cannot save files
    http://social.technet.microsoft.com/Forums/windowsserver/en-US/721fb2f1-205b-46e5-a3dc-3029e5df9b5b/special-permissions-user-cannot-save-files
    Best Regards,
    Mandy 
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]

  • Windows 2008 DNS & DHCP configuration steps for 11gR2 GI install with GNS

    Hi,
    I have windows 2008 R2 server with DNS & DHCP services installed. I am planning to install 2 node RAC with GNS option.
    The problem is i could not find any document to setup the windows 2008 DNS server for the below steps.
    a. Configure GNS VIP : add a name resolution entry in a DNS for the GNS virtual IP address in the forward Lookup file.
    gns-server IN A <virtual_IP>
    where gns-server is the GNS virtual IP address given during grid installation.
    b. Configure the GNS sub-domain delegation: add an entry in the DNS to establish DNS Lookup that directs the DNS resolution of a GNS subdomain to the cluster.
    clusterdomain.example.com. NS gns-server.example.com.
    where clusterdomain.example.com is the GNS subdomain (provided during grid installation) that you
    delegate and gns-server.clustername.com resolves to GNS virtual IP address.
    I am aware that this configuration steps has to be taken care by the System administrator. Here is what he tried and the results.
    My SA was able to Configure GNS VIP in the DNS and the Nslookup works fine for this.
    When he Configures the GNS sub-domain delegation the nslookup fails when trying to resolve the SCAN name.
    Any step by step tutorial for this windows 2008 DNS & DHCP configuration for Oracle GNS setup would be highly appreciated.
    Thanks,
    Ashok Kumar.G

    Hi Guys,
    Any help on this request will be very helpful.
    Thanks,
    Ashok Kumar.G

  • Email issue - sent items not actually sending

    Has anybody come across this issue before? I have an IMAP email account on my Q10 and a 4G contract with O2. Sometimes (at least, I think this is an intermittent problem!) emails that I send from my Q10 show as sent and appear in the sent items folder on the server but they do not actually send and they never arrive at the recipient's mailbox. This is very confusing for me as the user because, as far as I can tell, the email looks to have been sent successfully and there is no warning that it has failed. Any thoughts on why this might happen?

    Okay.   Backing up.
    You send an email to yourself from the iPad and also do the same from the BlackBerry.   Both devices show that the email was sent.   You check the email account through the web interface and see the messages you sent in the sent items folder. You check the inbox and the message sent with the iPad is there but sometimes the message sent with the BlackBerry is not there.   
    Is that essentially correct?   If so, it sounds like the email service.   I wonder if you did the experiment over and over if you wouldn't find that the problem occasionally happens with email sent with other devices.    I also wonder if the missing emails won't eventually "arrive" in the Inbox.
    I'm also curious if this happens with another email service.   Do you have a Yahoo or Gmail or ISP account to test with?
    - Ira

  • Windows 2008 R2 - any news on when this will be supported?

    We are hot on the heals of an ECC6 upgrade, the plan is to put it into our virtual environment, which is windows 2008 R2 and hyper-v.  At this time we are going to have to setup our virtual servers with Windows 2008 in leu of 2008 R2 because it isn't showing up in the supported list in PAM ye (at least I'm not seeing itt.  I understand the plan was Q4 of this year. Am I missing something that says it is now in the supported list, or are we just going to have to go ahead and upgrade the OS later?
    Thanks
    Laurie McGniley

    Please check SAP note 1383873, once it is supported, this note will mention it.

  • Delivery & Billing block at item level when I create order with config mat

    HI All,
    I am getting delivery & Billing block at item level when I create an order with config material.
    And I am unable to remove the blocks manually since they appear in display mode even in change mode of sales order.
    but I could see a biiling document for this order in document flow with 0 value.
    Note:
    1. The item does not have any reason for rejection
    2. Ther is no block set at schedule line category too.
    Please give me your valid suggestion as soon as possible since it is production issue.
    Thanks & Regards

    Dear chandrashekar,
    Goto  VOV8 , select your order type - Billing - Billing block - keep this field as blank .
    Second one , take the default billing type in order type (VOV8) , and Goto OVV4 and click on selection criteria and select billing type , enter your billing type and choose , you will now get the listing of that biling type and check your settings are correct.
    saravanan

  • [E2010] [EWS] [C#] [Windows]: Unable to connect to remote server

    I have a Windows Service that uses EWS to connect to a mailbox and do some things with certain emails. The service has been running for a while now, with little to no issues. Just recently the service will stop and when viewing the event log, we receive
    the following error.
    Error Message: The request failed. Unable to connect to the remote server
    Inner Exception: System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full
       at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
       at System.Net.Sockets.Socket.InternalBind(EndPoint localEP)
       at System.Net.Sockets.Socket.BeginConnectEx(EndPoint remoteEP, Boolean flowContext, AsyncCallback callback, Object state)
       at System.Net.Sockets.Socket.UnsafeBeginConnect(EndPoint remoteEP, AsyncCallback callback, Object state)
       at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)
       --- End of inner exception stack trace ---
       at System.Net.HttpWebRequest.GetResponse()
       at Microsoft.Exchange.WebServices.Data.EwsHttpWebRequest.Microsoft.Exchange.WebServices.Data.IEwsHttpWebRequest.GetResponse()
       at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.GetEwsHttpWebResponse(IEwsHttpWebRequest request)
    Target Site: Microsoft.Exchange.WebServices.Data.IEwsHttpWebResponse GetEwsHttpWebResponse(Microsoft.Exchange.WebServices.Data.IEwsHttpWebRequest)
    Source: Microsoft.Exchange.WebServices
    Stack Trace:    at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.GetEwsHttpWebResponse(IEwsHttpWebRequest request)
       at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.ValidateAndEmitRequest(IEwsHttpWebRequest& request)
       at Microsoft.Exchange.WebServices.Data.MultiResponseServiceRequest`1.Execute()
       at Microsoft.Exchange.WebServices.Data.ExchangeService.FindItems[TItem](IEnumerable`1 parentFolderIds, SearchFilter searchFilter, String queryString, ViewBase view, Grouping groupBy, ServiceErrorHandling errorHandlingMode)
       at Microsoft.Exchange.WebServices.Data.ExchangeService.FindItems(FolderId parentFolderId, SearchFilter searchFilter, ViewBase view)
       at MyClass.CleanupDeletedItems()
       at MyClass.ReadEmail()
       at MyService.WorkerFunction()
    This so far has only occured twice, but I am not sure if the issue is on the exchange servers, or the server where the service itself is running. Any ideas on what would cause this issue and how to go about fixing it?
    If you find that my post has answered your question, please mark it as the answer. If you find my post to be helpful in anyway, please click vote as helpful.
    Don't Retire Technet

    Hi Clayman
    Well it makes sense to me that the registry could help, checking the lines in the error code, it appears that the for some reason the server could not stablish a connection, the error states: because the system lacked sufficient buffer space or because a queue
    was full.
    It seems don't make sence untill you have a look at Socket Class (MSDN article), which say: The Socket class provides a rich set of methods and properties for network communications. The Socket class allows you to perform both synchronous and asynchronous data
    transfer using any of the communication protocols listed in the ProtocolType
    Checking also the HttpWebRequest Class, we can see the it also relays on Socket Class, as it says by the end of your exception:
    [at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)]
    I also don't know if you could reboot your machine, but it would be good.
    Also I really think its worthy a try, as not much information can befound on this EWS issue.
    MaxUserPort
    From <http://technet.microsoft.com/en-us/library/cc938196.aspx> 
    Socket Class
    From <http://msdn.microsoft.com/en-us/library/system.net.sockets.socket(v=vs.110).aspx> 
    HttpWebRequest.GetResponse Method
    From <http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.getresponse(v=vs.110).aspx> 
    HttpWebRequest Class
    From <http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest(v=vs.110).aspx> 
    If you apply the registry change, let me know.
    Think before you ask, be detalist as much as possible, then ask and you will get help! Always have in mind, people do not guess! :)

  • [E2010] [EWS] [C#] [Windows]: How do I assign public folder Permission to a distribution Group

    Hi,
    I have a little C# Form Application which should be create a Public Folder and assign permission for a Distribution Group in Exchange 2010.
    I have found following in the EWS Documentation:
     FolderPermission fp = new FolderPermission();
     fp.UserId.PrimarySmtpAddress = "[email protected]";
    If i try this with a User Email it works as well. But if I try to set a Email address from a Distribution Group it will throw this Error:
    "Invailid UserID"
    Does anybody know, how to set Folder Permissions to a Distribution Group?
    Thanks,
    Julian

    You can't set permission on an Item in a Public folder the only level you can set the permissions at are on the folder. Your probably better of using a Distribution Group which you can create via the Exchange Management Shell
    http://technet.microsoft.com/en-AU/library/aa998856(v=exchg.150).aspx l. You can then set rights on who can use this distribution group and it will also be visible in the GAL
    etc.
    cheers
    Glen

  • [E2010] [EWS] [C#] [Windows]: The AutoDiscovery service couldn't be located

    I have a windows service that has been running in Production for awhile now, without too many issues. This service utilizes EWS to monitor a mailbox for certain emails. As of last night we started receiving the error message "The AutoDiscovery service
    couldn't be located". I talked with our exchange people and they said they did update the certificate, we have tried restarting the service and even restarted the server to no avail.
    What doesn't make since to me, is the service is also running on our dev server and is not experiencing the issue, which tells me that AutoDiscovery is fine. I am at a loss of what the issue could be, any help is much appreciated.
    If you find that my post has answered your question, please mark it as the answer. If you find my post to be helpful in anyway, please click vote as helpful.
    Don't Retire Technet

    Yes I am using the managed API. I was finally able to reproduce the issue in DEV, by installing Prods code base there, as there was some slight differences between DEV's and Prod's code base. Made some code adjustments and have everything working now,
    but thank you for your assistance.
    If you find that my post has answered your question, please mark it as the answer. If you find my post to be helpful in anyway, please click vote as helpful.
    Don't Retire Technet

  • [E2010] [EWS] [C#] [Windows]: Exchange-service not working anymore after upgrade to 2010

    I have searched for this error/question I have but the solutions were not related to my situation and/or didn't provide any further infiormation. That being said... Under Exchange 2007, following code was running properly:
    ServicePointManager.ServerCertificateValidationCallback = CertificateValidationCallBack;
    ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2007_SP1);
    service.Url = new Uri(ConfigurationManager.AppSettings["ExchangeWebService"]);
    service.Credentials = CredentialCache.DefaultNetworkCredentials;
    EmailMessage mail = new EmailMessage(service);
    mail.Subject = subject;
    mail.Body = message;
    mail.Attachments.AddFileAttachment(row.Path);
    mail.ToRecipients.Add(receiver);
    mail.Send();
    Now, there has been a migration to Exchange 2010 and I get the following message from the `Microsoft.Exchange.WebServices.Data.ServiceResponseException` that is thrown:
    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.
    I know that the enumeration for the ExchangeVersion can be changed but when I change this to `SharePoint2010` for example I get following error-message:
    Exchange Server doesn't support the requested version.
    Are there settings in Exchange that need to be set for which I have to contact the Exchange-administrator or is there something in the code that needs to be changed?

    Hi Abbas,
    I'm not quite clear on all API version changes, however I would indeed recommend trying the current version (which is downwards compatible). I think I remember something about 1.1 being slightly buggy, but that's more of an itch in the back of may brain
    than real knowledge. Still, being fairly current is a good state to be in usually.
    Given the information however, my best guess really is that they changed their transport rules to prohibit anonymous sending. If that's the case, the executing user either
    must be given either ...
    A valid mail address
    Sending as permissions
    or Impersonation permissions and the identity of the user to impersonate (who then will be the sender)
    or on the other hand, get permission to send mails anonymously (which is really a custom transport rule).
    Cheers,
    Fred
    There's no place like 127.0.0.1

Maybe you are looking for

  • Family member upgrade question answered by a cust svc rep

    Ok, here is my situation, which I am sure applies to a lot of people here on the forums.  My wife is eligible for an upgrade on her line (has been eligible for upgrade since 2008), I am eligible for an upgrade on my line only by calling and ordering

  • IMac freezing and kernel panicking

    My iMac 20" is keeping on freezing and then has a kernel panic a second to a minute after the freeze occurs. The following is the log from panic.log Mon Aug 27 20:13:10 2007 panic(cpu 0 caller 0x00191931): pmapflushtlbs() timeout pmap=0x30c30e8 cpust

  • IPhone 3G Dock - Apple Remote?

    Is it possible to use an Apple remote (the little white ones that come with a MacBook) to control my iPhone 3G while sitting in the 3G dock? If not, does anyone know of a dock with IR where this is possible? THANKS!

  • OPM production Management for Float Glass industries

    Hi The Process of Float Glass Manufacturing is same throughout the world. Brief Process Desc. All the Raw materials (Sand, Dolamite, Limestone, Soda Ash, Sodium Sulphate, Carbon, Iron Oxide) are weighed correctly and send it into the Furnace where al

  • Asian Fonts

    Hi, I have the habit of creating webpage into PDF format for offline reading. But recently i found out that there is a problem when the webpage is in Asian language, in this case, Chinese. When i try to do this, the fonts of Chinese webpage will turn