Create and send an email as a delegate using EWS Managed API

Hi All,
I would like to create and send an email as a delegate using EWS Managed API for that i have crated one user as a delegate to that mailbox owner.
after adding user as delegate, when i try to create an email The EmailMessage class taking only FolderId as parameter but not taking Mailbox object as parameter. But in web reference they said that EmailMessage taking FolderId and Mailbox object as parameter.
EmailMessage message = new EmailMessage(service);
message.Subject = "Company Soccer Team";
message.Body = "Are you interested in joining?";
message.ToRecipients.Add("[email protected]");
message.Save(new FolderId(WellKnownFolderName.Drafts, new Mailbox("[email protected]")));https://msdn.microsoft.com/EN-US/library/office/dn641963(v=exchg.150).aspx#bk_createewsmacould you people please help me on this?ThanksNaresh

Thanks for reply glen.
I have added delegate using Add-MailboxPermissions. Now i am able to save an email in mailbox owner drafts
folder.
Glen,
 I have a one more question.(I am using EWS Managed API).
I(owner) have shared my calendar(eg. samplecalenderfolder) with another user(delegate) (i.e.,he is the
delegate of my mailbox) and i have given only permission to the this folder(samplecalenderfolder)
only and the permission level is Reviewer.
if i login with user(i.e.delegate) i am not able to get the shared calendar folders(i.e.,samplecalenderfolder)
that what i a have shared.
below is the code snippet i am using to get the calendar folders.
Folder folder = Folder.Bind(service,WellKnownFolderName.Calendar);
FindFoldersResults addtionalFolders = service.FindFolders(folder.Id, new FolderView(10));
could you please tell us how to get the shared calendar folders.
Thanks
Naresh

Similar Messages

  • Issues with creating and sending BOM XML IDOC to SAP using 2010 WCF-SAP Adapter (without using Biztalk Server)

      I'm trying to replace an existing Biztalk 2006 Send BOM IDOC process, and completely remove Biztalk server from the equation.   The existing Bizatalk 2006 server receives an input BOM (Bill of Materials) flat file, and using a Biztalk Map (BM08),
    and Orchestration, generates an Idoc and sends it to SAP.
      In my replacement C# program, I'm using the 2010 WCF-SAP Adapter, and am trying to generate the BOMMAT03 XML IDOC it to SAP.  
      I generated the BOMMAT03 schema from SAP using the Add Adapter Service in VS 2010.  I was able to generate a BM08 XSLT from the existing BMO8 map in the current Biztalk 2006 process.  I am able to run a XSLT transform on the input BOM flat
    file, and generate an XML file from that.  
      However, I've run into a few issues.   First of which, is that the XML file that is generated from the XSLT transform is NOT the same schema as the BOMMAT03 schema expects.  It's somewhat similar, but different enough that I have to manually
    translate between the two in my code.  I've verified that both the original Bitztalk 2006 process and my replacement program use BOMMAT V3 from SAP.  Question--Is Biztalk 2006 server doing some other magic to turn that transormed XML into the BOMMAT03
    schema?    
     I ended writing code which translates the transformed XML into the BOMMAT03 schema (which is a strong typed XML IDOC at this point).
      However, when I try to send the BOMMAT03 XML IDOC, I get an exception "Object reference not set to an instance of an object."
                   idocClient.Send(idocData, ref sadapterTxGuid);
    idocData is of type BOMMAT03, and I've verified that the various fields are populated.  
      Any help is appreciated. 

    Well, putting in a MSDN subscription support ticket for Biztalk server actually helped with the issue.  They didn't find, or fix the issue directly.  But one of the examples (https://randypaulo.wordpress.com/tag/idoc/) they sent over, jogged my
    memory, and I realized in the code snippet below, I had accidentally deleted the 1st line.  Such a simple mistake, yet was easy to overlook.  The URL example is almost EXACTLY like my code, but without the transform and translation code to convert
    from input XML file to IDOC XML.  If someone is interested in that, let me know.    
    //Forgot the 1st line.  
    idocClient = new IdocBOMMAT03SIEIS_WED_BOMMAT03V3R700Client(binding, endpointAddress);
     idocClient.Send(idocData, ref sadapterTxGuid);
    For anyone else interested in knowing, you CAN send a strongly typed IDOC to SAP using C#.NET and the WCF SAP 2010 Adapter, using the IDOC Binding Client class you generated using the Add Adapter Service Reference in VS2010.  
    The one difference, which no one, not even the tech support from MS could tell me, was why the XSLT which I generated from the original map, did not transform the input BOM XML into the BOMMAT03 XML.  Instead, it transformed it into an intermediate
    XML, which resembled the BOMMAT03 IDOC XML, but still needed to be translated to the BOMMAT03 IDOC format.  
    The tech support person swore up and down that it should.  But I believe that something happens in Biztalk server, after the Mapping occurs, maybe in the Pipeline, which converts that
    intermediate XML into the final BOMMAT03 IDOC XML format.
    I do think that the examples are severely lacking in showing how to send a strong typed IDOC using C# and the WCF-SAP Adapter.  Even worse, the examples are completely lacking in how to actually generate a weakly typed IDOC.  They show how to send
    that weakly typed IDOC, but show me, or give me a class to be able to generate it.
    I realize that this is not quite the "recommended way" to do it, but in reality, not everyone wants or even needs a full Biztalk installation.   For some simple stuff like this, a C#.NET program and WCF-SAP adapter do the trick.  

  • Create and send by email MEMORY REPORT

    Extract Report Memory Type and
    Number Automatically
    Hello everyone!
    I'm looking for some tool or code
    (. Bat) to Take out a report
    memory type DDR, DDR2 ,quantity automatically
    on many computers ...
    The idea is to email the tool or bat, and attach
    to an email to return to that information.
    I searched for tools like CPU-Z
    but not if you can do this automatically...
    I hope you can help.
    Thank you!
    DreamerMX
    DreamerMS

    Hello,
    The Windows Desktop Perfmon and Diagnostic tools forum is to discuss performance monitor (perfmon), resource monitor (resmon), and task manager, focusing on HOW-TO, Errors/Problems, and usage scenarios.
    Since your post is off-topic, I am moving it to the
    off topic forum.
    Karl
    When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
    My Blog: Unlock PowerShell
    My Book:
    Windows PowerShell 2.0 Bible
    My E-mail: -join ('6F6C646B61726C406F75746C6F6F6B2E636F6D'-split'(?<=\G.{2})'|%{if($_){[char][int]"0x$_"}})

  • EWS Managed API - 1. BindToItems returns ErrorAccessDenied error, 2. appointments created in one mailbox show up in others

    Hi,
    I know there are other questions about ErrorAccessDenied but they are not exactly describing my situation and all are pretty much old and mostly not answered so forgive me for creating my own.
    Also, wall of text coming so please bear with me.
    We have an application that synchronizes Exchange items into our internal systems. Items created on Exchange are stored in that system and vice versa of course with a lot of business logic and rules, etc. Application uses EWS Managed API and impersonation
    to access users mailboxes. Everything works fine but now we have this one customer that has a lot of strange things going on with main 2 problems mentioned in subject.
    1. To ensure both sides (Exchange and our system) are in sync we have a functionality that allows users to decide that items no longer existing on Exchange should be removed also from system database. Since in our record we store id of original Exchange
    item internal system simply sends us list of those ids to confirm items still exist. What application does is a BindToItems method call with BasePropertySet.IdOnly as requested property and depending on server response we notify internal system about state
    of items. There is some semi complex logic behind what exactly is done on system side but in general NoError and item returned means item exists, ErrorItemNotFound means item doesn't exist.
    For this one customer suddenly we started to receive ErrorAccessDenied and ErrorBatchProcessingStopped error codes which is very strange because seconds earlier there were events read from PullSubscribtion, items read from server, items created on server
    and bunch of other stuff going on which basically makes me sure that impersonation is working. For some reason during execution of this particular code ErrorAccesDenied is returned and it messes up whole BindToItems call.
    But what is really strange is that for first id in list of ids we get NoError and correct item returned, for second id we get ErrorAccessDenied, and rest of responses is ErrorBatchProcessingStopped. So is it really about credentials or there is some
    completely different reason AccessDenied is retuned? According to customer those items exist in user mailbox for whom those errors are showing up. It doesn't happen for all users, only for some - who have exactly the same configuration of mailboxes as rest
    (according to customer).
    2. For same customer another problem started to occur since 1st of January, at least that is a date when they noticed it for the first time. Again, it happens for some users and there is no scenario that would guarantee to reproduce it.
    When new record is created in our system or its data change it has to be created/updated on Exchange. With same impersonation as for problem described above I simply create new item or find existing item using id provided by our system, set item properties
    according to whatever was sent and save/update item on Exchange. Simple and it works in multiple installations without problems.
    But this customer reports that appointments created for one user show up in other users mailboxes which I find really strange because as far as I know when I impersonate [email protected] everything I do is executed in context of this one user only. So if
    I create appointment in his calendar I cannot create same appointment in userB's calendar without explicitly switching impersonation to userB. What is worth mentioning during our sync process we store on Exchange items bunch of custom properties that help
    us verify whole process and do various filters, etc. All of those custom properties are visible in outlook in that design form view or whatever it is called. And I have screenshot from user that claims to have one of those "not his" appointments
    and basically half of our properties is not there and some have no values while they definitely should have otherwise whole sync would fail and everything is logged as successful.
    Sorry for this wall of text but I really have no idea what can causing those strange problems so I tried to describe as much as possible without breaching NDA and such stuff. We added a lot of logging around areas where impersonation is changed, Exchange
    items are created/updated, etc. Logs show nothing, of course.
    So, for first issue: is it possible that items were moved on Exchange in such way that user still can see them but for EWS API call we get ErrorAccessDenied? I'm not sure where exactly could be such location because if id of an item would change we should
    rather get ErrorItemNotFound or even something about id being not properly formatted, right?
    For second issue: is it possible that there is something running on Exchange server and does some kind of simplistic mirroring of items between mailboxes? Customer claims there are no such things on server nor user side but can it be something that non-IT
    people wouldn't know? Like some kind of script that admins like to run to keep server healthy or something innocent but lethal for our scenarios? Anybody has any hints what we should even ask customer about to get closer to solution of those mysterious problems?

    Were you able to figure what was going on with your first problem? we're seeing the exact same issue with one of our customers.

  • Trigger a event and send an email  when a new entry is created in a table

    Hi All,
                I have scenario here where i want to trigger a event and send an email too when a new entry is created in a Ztable or an existing entry is changed.
    Please let me know how can i achieve this.
    Please excuse me if you find it basic as I am not very old in Workflows.
    Thanks in Advance,
    Saket.

    Hi..
    For your Requirement workflow not Required.
    Write a  Program to send Mail. This Program has to execute when ever the Save Button is Click, then the mail will be sent.
    Check the program in this [link|https://wiki.sdn.sap.com/wiki/x/nYKdAw ], which send the mail.
    Regards,
    Surjith

  • Create and send email issue with UCCX/IP-IVR 8.0 script

    Hi all,
    I am facing issue with create and send email option with script. In my call flow there is an option to offer call to key in their phone number and script need to pass that phone number to supervisor as an email. I have created the script but every time when I key in the phone number is pass through the unsuccessful node. Please find the script as attachment.
    Thanks and Regards,
    Ashfaque

    Hi How Yee,
    Which version of UCCX/IPIVR you are using and what is the type of license? Because this feature is only supported with Premium License. Please check the UCCX data sheet from the below link.
    http://www.cisco.com/en/US/partner/prod/collateral/voicesw/custcosw/ps5693/ps1846/data_sheet_c78-629807.html
    You will get the information under "Integrated IVR Features with Server Software" of table:4.
    Thanks and Regards,
    Ashfaque.

  • How do I create, and send a group email on my iPhone?

    How do I create, and send a group email from my iPhone 4?

    How to send group email without additional APP
    Just spent an hour on ichat.  Long and short....can't send group email.  The group name appears in the TO: line, but if you click on the group name, only the first email address is blue..the rest are black and will not get the email.  We tired using the CC and BC lines...same result. 
    However here is one solution:
    I sent one email with each of the group (we are only 9 ) in the TO: line.  I included my primary email.  When it came to the iphone, i moved it to one of the subfolders.  (Each account you may have has a list of the inbox at the top and Account at the bottom.  ... that is where you can access the subfolder)
    I moved the email with all names to that subfolder.  I can then, open it ...do a relpy to all and just change the message and subject line.   It is cumbersome, but it does work.  I really think Apple, a company committed to ease of use, needs to review this flaw.  I suspect it may be a bandwidth economy ....  and i feel the pain of the providers...but you did create the beast. 

  • Weird: receiving and sending old emails

    I am both receiving and sending old emails - from about a month ago.
    Emails that I've previously received are turning up again in my inbox. They are flagged as newly received, but the send date is from about 6 weeks ago. No message appears more than once and they are appearing in the order they were originally sent.
    In addition, my contacts are receiving emails from me again, also sent from that same period, about 6 weeks previously.
    There's another thing. Often, an email will appear in the Outbox from nowhere. This can be either an email I previously sent, or an email I've previously received. When I delete it, it goes to trash. However, when I go to inbox, or another folder, then BACK to Outbox, another email will appear in its place.
    Weird, huh?
    I've talked at length with my ISP about this and they've had me rebuild my account, only for the problem to persist.
    Any advice would be greatly appreciated. Many thanks!

    Some if not all the problems you’ve described are caused by some index corruption (which in turn might be caused by some filesystem corruption) that makes messages to randomly appear in a mailbox different from where they’re supposed to be. If that mailbox happens to be Outbox, Mail thinks the messages are waiting to be sent and dutifully proceeds to try to send them.
    Verify/repair the startup disk (not just permissions), as described here:
    The Repair functions of Disk Utility: what's it all about?
    After having fixed all the filesystem issues, if any, and ensuring that there’s enough space available on the startup disk (a few GB, plus the space needed to make a backup copy of the Mail folder), try this:
    1. Quit Mail if it’s running.
    2. In the Finder, go to ~/Library/Mail/. Make a backup copy of this folder, just in case something goes wrong, e.g. by dragging it to the Desktop while holding the Option (Alt) key down. This is where all your mail is locally stored.
    3. Locate Envelope Index and move it to the Trash. If you see any other “Envelope Index”-named file there, delete it as well.
    4. Move any “IMAP-”, “Mac-”, or “Exchange-” account folders to the Trash. Note that you can do this with IMAP-type accounts because they store mail on the server and Mail can easily re-create them. DON’T trash any “POP-” account folders, as that would cause all the mail stored there to be lost.
    5. Open Mail. It will tell you that your mail needs to be “imported”. Click Continue and Mail will proceed to re-create Envelope Index — Mail says it’s “importing”, but it just re-creates the index if the mailboxes are already in Mail 2.x format.
    6. As a side effect of having removed the IMAP account folders, those accounts may be in an “offline” state now. Do Mailbox > Go Online to bring them back online.
    Note: For those not familiarized with the ~/ notation, it refers to the user’s home folder. That is, ~/Library is the Library folder within the user’s home folder, i.e. /Users/username/Library.

  • Create and send EDM using Adobe MUSE and Business Catalyst.

    There is just one thing missing in my armour as a graphic designer – creating and sending EDMs.
    Given the success of creating websites using Adobe Muse, an EDM functionality would be a fantastic addition to MUSE and Business Catalyst (BC). Imagine this:
    1. I open Adobe Muse.
    2. I select "New EDM"  (instead of "New Site").
    3. I design and build my EDM to spec.
    4. I test my EDM using 'Preview' or a single send to myself.
    5. I publish my EDM to Business Catalyst.
    6. In BC, I review my EDM and add 'FROM NAME', 'FROM EMAIL ADDRESS' and 'SUBJECT'.
    7. I import my database.
    8. I hit SEND!
    After my EDM has gone out, I can review a report in BC - just like any report for a website.
    As a designer that does not know code but can build a website using MUSE - creating an EDM is the one thing I can't personally offer. Using a digital supplier can be expensive and website like Mail Chimp aren't professional enough.
    To the Adobe Muse team, please – for the love of humanity – consider this as viable addition to MUSE. You will save a lot of heart ache and win a lot of hearts.
    Thanks,
    Phil

    Done!
    See here: Create and send EDM using Adobe MUSE and Business Catalyst.

  • Certificate for the website, was going to copy and send an email to the website to ask about the certificate. I got my cursor just inside the pop up and the whole computer shut down. Why what happened i am not sure about going to the website now....

    Question
    Went to Crossings Book Club website while there something popped up about the certificate for the website, i was going to copy it and send an email to the website to ask about the certificate. I got my cursor just inside the pop up and the whole computer shut down.

    If you think getting your web pages to appear OK in all the major browsers is tricky then dealing with email clients is way worse. There are so many of them.
    If you want to bulk email yourself, there are apps for it and their templates will work in most cases...
    http://www.iwebformusicians.com/Website-Email-Marketing/EBlast.html
    This one will create the form, database and send out the emails...
    http://www.iwebformusicians.com/Website-Email-Marketing/MailShoot.html
    The alternative is to use a marketing service if your business can justify the cost. Their templates are tested in all the common email clients...
    http://www.iwebformusicians.com/Website-Email-Marketing/Email-Marketing-Service. html
    "I may receive some form of compensation, financial or otherwise, from my recommendation or link."

  • I was receiving and sending my emails perfectly, now nothing gets downloaded? It checks for new emails but do not find anything and I know there is. Please help

    I was receiving and sending my emails perfectly, now nothing gets downloaded? It checks for new emails but do not find anything and I know there is. Please help

    Oh, the irony of referring to yourself as "myklthebrain".  Make an appointment, at the nearest Apple store, with an Apple Genius, and hope that (s)he can sort it out.

  • How to create and send clob value to SP?

    Hi,
    Does any one of an example of how to create and send
    a clob value(as a IN parameter to storedprocedure) from JAVA to
    the StoredProcedure. I need the JAVA code.
    null

    Hi 
    Following is sample code you can use.
    DECLARE @testID Int
    DECLARE @year int 
    DECLARE @testtype datatype
    SELECT @testtype=testtype from yourTable Where Your condition
    SELECT  @year= year from yourTable Where your conditon (you need to make sure you assign or get @year variable )
    SELECT @testid=id from test where  year=@year and testtype=@testtype)
    Hope this helps
    Regards

  • My iMac drops settings information.  Sounds associated with receiving and sending an email disappear after about a week and return following a restart after a shutdown.  Also my picture taken, which was taken about a year ago, recently disappeared.

    My iMac drops settings information.  Sounds associated with receiving and sending an email disppear after about a week and return following a shutdown and a restart.  The cycle contunes.  Also, the picture of me that was taken when I bought the iMac more than a year ago and appeared at logon recently disappeared and was replaced by a soccer ball.  I took a new picture, which appeared for about a week at logon, and it has now been replace by a blank picture.

    The standard procedure with these types of isues is a PRAM reset.
    Shut down your Mac.
    Locate the following keys on the keyboard: Command (⌘), Option, P, and R. You will need to hold these keys down simultaneously in step 4.
    Turn on the computer.
    Press and hold the Command-Option-P-R keys before the gray screen appears.
    Hold the keys down until the computer restarts and you hear the startup sound for the second time.
    Release the keys.
    Excerpt from http://support.apple.com/kb/ht1379

  • HT4623 I received a message on my iPad re update to iO7 and I said yes, install. Now it's stuck on the agree/disagree page; nothing moves when I press Agree and Send by Email. Can anyone help?

    I received a message on my iPad re update to iO7 and I said yes, install. Now it's stuck on the agree/disagree page; nothing moves when I press Agree and Send by Email. Can anyone help?

    Reset iPad and continue with update.
    Hold down the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears
    Note: Data will not be affected.

  • I forgot the answers to my questions when I try and send an email to reset it the email never comes

    I forgot the answers to my questions when I try and send an email to reset it the email never comes. Help please.

    A rescue email address is different than an alternate email address.
    Contact iTunes Support online at: http://apple.com/emea/support/itunes/contact.html (select Account Security as your help topic)
    or
    by phone: Apple Support Numbers

Maybe you are looking for

  • How to display nodestamp column in ApplicationsTreeTable -ViewMenu- Columns

    I have ApplicationsTree table on my UI screen with the columns ex: col1, col2, col3, col4. col1 is inside node stamp. col1 is not displaying under View Menu -> Columns. How can I display nodestamp column in ViewMenu -> Columns? Thanks, Swathi

  • "Add Printer" not functioning

    Hello- I've been experiencing a weird problem within my Printer Setup Utility. When i click the "Add +" icon to add a printer to my queue(sp?), nothing happens... nothing. I first tried it with a laser printer connected vis ethernet to my wireless Be

  • YouCam video won't play - only audio. Used link from apps page. Can see screen capture.

    Hi there, We recorded a 1 minute video using Cyberlink Youcam (the one on the 8.1 apps page, as opposed to the one with shortcut on the main desktop page - Youcam5.) We can see te screenshot of the video, and hear the audio for entire duration of rec

  • Export with ldapsearch failing

    I'm trying to export the "users" directory of the Open Directory of our Snow Leopard Server to an .ldif file. We would like to copy and import this segment to another external LDAP server to use for authentication on another app... basically a one-wa

  • Added 512mb ram to G4 iBook - down to 256mb. What gives?

    I added 512mb of ram (ram specs straight from G4 manual) to my G4 ibook for a total of 768mb of ram. I checked this in system profiler - perfect! 4 hours later my book froze and wa-la! I'm down to a total of 512mb ram. The 256mb installed (came w/ bo