exchange-server

Getting attachments from Exchange Managed API using ASP.NET Core

巧了我就是萌 提交于 2019-12-08 04:08:47
问题 I am in the process of building an Outlook Add-In that authenticates to an external API that is also in my possession. For one of my functions, I am sending a list of attachment IDs from the add-in to the API. I can then use these IDs to get the corresponding attachments from Microsoft's Exchange Managed API. The issue is that because I'm using .NET Core, the recommended libraries are lacking the necessary functionality needed to access the attachments. Here is some code that I am trying to

Enable exchange 2010 mailbox

一笑奈何 提交于 2019-12-08 02:28:44
问题 I'm trying to create/enable a mailbox on an exchange 2010 server from C# code. Everywhere I look I see people using the code shown below. However I get the following error: The term 'Enable-Mailbox' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. What am I doing wrong? SecureString password = new SecureString(); string str_password = "myPassword";

Get Microsoft Exchange Authentication token through Android's AccountManager

孤街醉人 提交于 2019-12-08 02:23:54
问题 I am working on an Android 3.0 program that can connect to a SSL'd php webservice (outputs data in JSON, I can modify the server). The tablets that are connecting to this service have a corporate Microsoft ActiveSync (exchange 2010) account, and only that account (no google accounts,FB, etc). I would like to write a program that can use the credentials saved in the tablet's android.accounts.AccountManager to make secure requests on that PHP webservice. I tried following some google examples

Get-Mailboxpermission for list of Mailboxes

三世轮回 提交于 2019-12-08 01:26:08
问题 I want to get a list of all permissions for a specified list of mailboxes. To get all permissions for just one, I can do this: Get-MailboxPermission -Identity "Mailbox01" What if I wanted to get a list of permissions for more than one mailbox at a time? Something like: Get-MailboxPermission -Identity "Mailbox01","Mailbox02","Mailbox03" How could I do something like that - in one list? 回答1: something like this should work: "Mailbox01","Mailbox02","Mailbox03" | % { Get-MailboxPermission

JavaMail SMTPSendFailedException

北城余情 提交于 2019-12-07 23:15:55
问题 I am writing a bulk email program using the JavaMail api. I have a Microsoft Exhange server which I am trying to send the emails in to. When I run my program I get the following error: **com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:2057) at com.sun.mail.smtp.SMTPTransport.finishData(SMTPTransport.java:1862) at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1100) at javax.mail.Transport.send0(Transport.java:195) at javax.mail.Transport.send(Transport.java

Powershell - Outlook Mark all mails as read then delete

前提是你 提交于 2019-12-07 19:22:42
问题 having some problems trying to figure this one out. For some reason my script is not working as it should. It should mark all mails in inbox folder as read and then delete them. However, when the script runs it only delete's half of the .count $emails show... How to solve this, am I doing something wrong? $outlook = new-object -comobject outlook.application #Define folders $namespace = $outlook.GetNameSpace("MAPI") $pst = $namespace.Stores $pstRoot = $pst.GetRootFolder() $pstFolders =

Capturing powershell warning

喜欢而已 提交于 2019-12-07 13:40:25
问题 I am trying to capture the warning that gets thrown if I try to remove mailbox permissions from a mailbox for someone who doesn't have permissions in the first place. #$WarningPreference = "continue" try { Add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010 Remove-MailboxPermission -Identity "test2" -User "test1" -AccessRights FullAccess -InheritanceType All -confirm:$False | Out-File c:\temp\output2.txt -Encoding ASCII } catch { #Write-Warning -Message $($_.Exception.Message) 3 > c:

When using manually set credentials, EWS auto discover stops working

◇◆丶佛笑我妖孽 提交于 2019-12-07 13:18:41
问题 I am running into a very strange issue and I am convinced it is just something stupid that I am overlooking. Using the EWS managed API, I try to connect to a mailbox to read the contacts. Originally, I used the default credentials, in which case the auto discovery worked. The problem is that later on we want to run this on a server and impersonate a user, so I changed it by manually specifying the credentials. This then broke, even when using my own credentials. As an example, this worked:

UseDefaultCredentials with Exchange Web Services

二次信任 提交于 2019-12-07 11:58:37
问题 I'm a pretty new programmer. One of the things I've been tasked with at work is getting our custom tools to create draft emails and drop them into the draft email folder of the user running the tool. We presently use Exchange Server 2010 (but are in the process of migrating over to Exchange Online). This link talks about a UseDefaultCredentials but I can't seem to work out how to implement it. I created an ExchangeService object called service and managed to interact with our Exchange server

SmtpClient.Send randomly causes SmtpException 4.7.0 timeout waiting for client input

旧街凉风 提交于 2019-12-07 11:12:33
问题 I can't seem to find the cause for this problem. Sometimes I get SmtpException "4.7.0 timeout waiting for client input" being thrown on using the following c# code for .net-4.0: using System; using System.Net.Mail; namespace SendMail { class Program { static void Main(string[] args) { for (int i = 0; i < 100; i++) { string html = "<h1>TEST</h1>"; using (MailMessage mail = new MailMessage("sender@domain.com", "receiver@domain.com")) { mail.Subject = "Test"; mail.IsBodyHtml = true; mail.Body =