exchange-server

MSExchange URL encoding

早过忘川 提交于 2019-12-24 02:47:10
问题 I am writing a PHP service to query an Exchange server via WebDAV. This service has been live for roughly a month with no issues, but experienced a hiccup today when an email with the following subject line arrived in the mailbox: FW: Daily Approval Report: Vendor/Master 007297 The message is stored in the file "FW: Daily Approval Report: Vendor/Master 007297.EML" and is referenced through a url as: FW:%20Daily%20Approval%20Report:%20Vendor_xF8FF_Master%20007297.EML I had been using the PHP

Catching errors in the Exchange Management Shell

被刻印的时光 ゝ 提交于 2019-12-23 23:07:41
问题 I'm trying to write a powershell script that creates an Exchange Mailbox. This works fine as long as the Mailbox doesn't already exist, but when I try to catch any error and report it back the script just runs through as if everythign were fine. I ran the script on an already existing user and it shows the error, but it returns normally as if the mailbox was created. I found this question, which solved the "why", I guess the Enable-Mailbox command only throws non-terminating errors. Anyway,

FindItems() and BindToItems() give inconsistent results for EmailMessage.Sender.Address

亡梦爱人 提交于 2019-12-23 20:13:21
问题 After quite a lot of debugging, I've refined a complicated Managed EWS problem down to the following two simple-ish test cases. The first one works, the second one fails: var view = new ItemView(100) { PropertySet = new PropertySet { EmailMessageSchema.Id } }; var findResults = ews.FindItems(WellKnownFolderName.Inbox, view) var bindResults = ews.BindToItems(findResults.Select(r => r.Id), new PropertySet { EmailMessageSchema.Sender }); // Sanity check Assert.AreEqual(1, bindResults.Count()); /

Exchange Web Services: UseDefaultCredentials property

末鹿安然 提交于 2019-12-23 18:14:49
问题 This Microsoft page indicates that by setting the UseDefaultCredentials property to true, no login name and password are required to communicate with the Exchange server. However, that is not my experience. My code creates an instance of ExchangeService called service: ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010); If I manually set the credentials as follows, everything works just fine: service.Credentials = new WebCredentials("my@email.address", "my password");

Enumerating shared mailbox names you are able to access using EWS Managed API

强颜欢笑 提交于 2019-12-23 17:31:15
问题 I set up a shared mailbox and can access it and its sub-folders: var folderId = new FolderId(WellKnownFolderName.MsgFolderRoot, "shared.mailbox@domain.local"); var folders = client.FindFolders(folderId, new FolderView(Int32.MaxValue)); To do this I need to know the name of the shared mailbox - in this example, the name of the shared mailbox is shared.mailbox@domain.local . Is there any way to enumerate through all of the shared mailbox names I am able to access? I have tried searching online

How to get user's exchange/outlook/office365 photo?

元气小坏坏 提交于 2019-12-23 17:20:07
问题 Our company is on Office 365. So when users sign in to my asp.net mvc website, I'd like to display their photo, like Outlook does. Where does outlook get the user's photo? And how I can get to it programmatically? I've tried hitting up the ActiveDirectory and fetching the thumbnailPhoto, but it's blank for most users. Thus Outlook must be getting it elsewhere. Where and how? I've also seen some examples where Microsoft.Office.Interop.Outlook assembly is used (assuming it requires Outlook

Swiftmailer won't send mail, but mail() will

妖精的绣舞 提交于 2019-12-23 15:08:26
问题 PHP's mail() function sends mail fine, but Swiftmailer's Swift_MailTransport doesn't work! This works: mail('user@example.com', 'test '.date('H:i:s'), ''); But this does not: $transport = Swift_MailTransport::newInstance(''); $mailer = Swift_Mailer::newInstance($transport); $message = Swift_Message::newInstance('test '.date('H:i:s')) ->setFrom('user@example.com') ->setTo('user@example.com') ->setBody('Testing one two three'); $result = $mailer->send($message); (The user@example.com is

How to get the sender of an e-mail in EWS MAPI?

ⅰ亾dé卋堺 提交于 2019-12-23 13:00:55
问题 I'm accessing all e-mails from Exchange Server by code using the EWS Managed API. I loop over all the items in the mailbox and load them: item.Load() I need to know the sender of the item/e-mail message. But I don't know how to access the property that has the information. Any help is appreciated. 回答1: This was my solution: EmailMessage mes = (EmailMessage)item; TextBox1.Text = mes.Sender.Name; After loading the item I just casted it to EmailMessage to get access to the properties and methods

How pipe powershell commands in c#

笑着哭i 提交于 2019-12-23 11:54:31
问题 The goal is get the smallest database of an Exchange 2010 site, so I'm trying to run the following powershell command from c#, Get-MailboxDatabase -server Exchange2010 -Status | select-object Name,DatabaseSize The problem I'm struggling is - how pipe the Select clause command. This is my attemp, WSManConnectionInfo wsConnectionInfo = new WSManConnectionInfo(new Uri("https://" + ExchangeSite + "/powershell?serializationLevel=Full"), "http://schemas.microsoft.com/powershell/Microsoft.Exchange",

Exchange Web Services Create Meeting Request Working Example

﹥>﹥吖頭↗ 提交于 2019-12-23 10:28:20
问题 Is there a working example anywhere of how to create a meeting request using EWS for Exchange 2007 using C#? Which properties are required? I have added a web service reference and can connect to create and send various items but keep getting the error "Set action is invalid for property." on the response messages. It never says what property is invalid var ews = new ExchangeServiceBinding { Credentials = new NetworkCredential("user", "pass"), Url = "https://servername/ews/exchange.asmx",