Hi!
We have a Exchange 2016 environment with REST API virtual directory. Kindly confirm if REST API can be made use of with a Pure On-prem set up or does this require a Hybrid set up with O-365.
Cheers
Priya
Hi!
We have a Exchange 2016 environment with REST API virtual directory. Kindly confirm if REST API can be made use of with a Pure On-prem set up or does this require a Hybrid set up with O-365.
Cheers
Priya
Hi,
I am using ews managed api to send and sync emails in a third party application using asp.net. I got stuck in a portion where the user sets the item response base shape to id only. Can you please help me with an example to retrieve Items based on a search filter, set base shape to id only and sync those items in asp.net?
Hi we have a SBS 2011 server. The Exchange 2010 which has SP3 installed is failing to get backed up and it appears as though the database is corrupt. The exchange data cannot be moved via the SBS console and states an error. I have noticed the database is on the D:\ drive however the log files are on the C:\ drive. We originally set everything to put on the bigger partition (D:\) so I'm not sure why this ha moved back to the C:\?
I've been given these commands from a SBS expert (below) however I think this is not correct and I need to do this only if I repaired the database from a backup. Please can I get some help on this?
1.
Run the following command to locate eseutil.exe<o:p></o:p>
cd
D:\program files\microsoft\exchange server\v14\bin<o:p></o:p>
2.
Run the following command to check if all the databases are clean shutdown<o:p></o:p>
Eseutil
/mh “D:\program files\microsoft\exchange server\v14\mailbox\mailbox database
2012010716\ mailbox database 2012010716.edb”<o:p></o:p>
3.
Run the following command to perform a soft repair<o:p></o:p>
Eseutil
/r “e00” /l “D:\program files\microsoft\exchange server\v14\mailbox\mailbox
database 2012010716” /d “D:\program files\microsoft\exchange
server\v14\mailbox\mailbox database 2012010716\ mailbox database
2012010716.edb” /a /I<o:p></o:p>
4.
Repair the corrupted database<o:p></o:p>
Run New-MailboxRepairRequest
-Database <DATABASE_NAME> -CorruptionType
ProvisionedFolder,SearchFolder,AggregateCounts,Folderview in EMS to
repair the corrupted database.<o:p></o:p>
Note: This
command repairs mailbox one by one, the specific user cannot access to the
specific mailbox which is being repaired.<o:p></o:p>
You
could run Get-MailboxRestoreRequest
| Get-MailboxRestoreRequestStatistics –IncludeReport | fl to check
the progress, when it is completed, please try to mount the database again.
Thank you. Chandu Kerai
Gagan
Hi,
I need to save the details of an email message in a db and I am having troubles getting the attachments in a single mail as an array. Let's consider that I am storing the details of a mail that consist of two attachments and I want to save the details of the attachments in my db. I am having troubles with the ExchangeService.GetAttchments() Function. I will attach the code below:
try
{
ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2016);
if (Exchange2007AutoDiscover)
service.Url = new Uri("https://outlook.office365.com/ews/Exchange.asmx");
else
service.Url = new Uri(ExchangeURL);
service.Credentials = new WebCredentials(POPMailAddress, POPMailPass);
System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
if (service == null) return;
SearchFilter.IsNotEqualTo restriction = new SearchFilter.IsNotEqualTo(ItemSchema.ItemClass, "IPM.Schedule.Meeting.Request");
SearchFilter.ContainsSubstring restriction1 = new SearchFilter.ContainsSubstring(ItemSchema.Attachments, "invite.ics", ContainmentMode.Prefixed, ComparisonMode.IgnoreCase);
SearchFilter.Not restriction1_1 = new SearchFilter.Not(restriction1);
SearchFilter.SearchFilterCollection restriction2 = new SearchFilter.SearchFilterCollection(Microsoft.Exchange.WebServices.Data.LogicalOperator.And);
restriction2.Add(restriction);
restriction2.Add(restriction1_1);
ItemView view = new ItemView(1000, 0, OffsetBasePoint.Beginning);
FindItemsResults<Item> inboxItems = null;
ExtendedPropertyDefinition extendedProperty = new ExtendedPropertyDefinition(0x1013, MapiPropertyType.String);
PropertySet propertySet = new PropertySet(PropertySet.FirstClassProperties.BasePropertySet, ItemSchema.MimeContent, extendedProperty);
propertySet.Add(extendedProperty);
propertySet.RequestedUniqueBodyType = Microsoft.Exchange.WebServices.Data.BodyType.HTML;
propertySet.RequestedBodyType = BodyType.HTML;
if (latestDate != DateTime.MinValue)
{
SearchFilter.IsGreaterThanOrEqualTo restriction3 = new SearchFilter.IsGreaterThanOrEqualTo(ItemSchema.DateTimeReceived, latestDate);
SearchFilter.SearchFilterCollection restriction4 = new SearchFilter.SearchFilterCollection(Microsoft.Exchange.WebServices.Data.LogicalOperator.And);
restriction4.Add(restriction2);
restriction4.Add(restriction3);
try
{
inboxItems = service.FindItems(WellKnownFolderName.Inbox, restriction4, view);
service.LoadPropertiesForItems(inboxItems, PropertySet.FirstClassProperties);
}
catch (Exception err)
{
ErrorLogger.LogError(err, rootFolder);
}
}
if (inboxItems != null)
{
for (int i = 0; i < inboxItems.Items.Count; i++)
{
if (inboxItems.Items[i] is EmailMessage && !MyEmailIds.ContainsKey(inboxItems.Items[i].Id))
{
string itemIdStr = (inboxItems.Items[i].Id).ToString();
EmailMessage message = EmailMessage.Bind(service, new ItemId(itemIdStr));
Microsoft.Exchange.WebServices.Data.Attachment[] attachments = null;
if (message.Attachments.Count > 0)
{
attachments = new Microsoft.Exchange.WebServices.Data.Attachment[message.Attachments.Count];
for (int j = 0; j < message.Attachments.Count; j++)
{
attachments[j] = service.GetAttachments(message.Attachments[j], BodyType.HTML, propertySet);
}
}
}
}
}
}
I am having troubles with getting the attachments of the email message in the array attachments[j].
I tested Exchange 2019 in lab environment, the message received per sencond is about 80 messages. The Exchagne queue viewer shows that queue of delivering messages to DB becomes higher.
The same server, I tested Exchagne 2016 before, the message received per sencond is about 140 messages.
I want to know the reasons. Can anyone help on this? Thanks in advance.
Environment:
Memory: 128G
Disk: SSD
CPU: Logical processors 40
3 ESP clients to send messages
Hi,
I have trouble getting both the plain text and html body of a message. I set theRequestedBodyType to BodyType.Html, by that way I could get the Html format but now I need Text too. Is there a way to attain both text and body of an EmailMessage?
Hi,
We use System.Net.Mail.SmtpClient class in C# to send mails using an Exchange 365 mailbox. This is the outline of the code:
System.Net.Mail.SmtpClient smtpClient = new System.Net.Mail.SmtpClient();
smtpClient.UseDefaultCredentials = false;
smtpClient.Credentials = new System.Net.NetworkCredential("Valid O365 Exchange User Email address", "Password");
smtpClient.Port = 587;
smtpClient.Host = "smtp.office365.com";
smtpClient.DeliveryMethod = SmtpDeliveryMethod.Network;
smtpClient.EnableSsl = true;
.............
MailMessage msg = new MailMessage();
msg.From = new MailAddress("noreply@abc.com"); // non-existent mailbox address
msg.Sender = new MailAddress("userEmail@xyz.com"); // Valid O365 user used in credentials above
..............
// add subject, body etc. and send
This was working till recently and in the received mail we used to see sender as "noreply@abc.com on behalf of userEmail@xyz.com".
However, this has stopped working recently and we are getting error. There is no change in code or the exchange configuration. Please let us know if this is due to any recent change and what is the possible fix for this error:
System.Net.Mail.SmtpException: Transaction failed. The server response was: 5.2.0 STOREDRV.Submission.Exception:SendAsDeniedException.MapiExceptionSendAsDenied; Failed to process message due to a permanent exception with message Cannot submit message
Thanks
Prakash Arya www.crowcanyon.com
Hello Good People,
Can anyone help me with the below error.
I have upgraded from Exchange 2010 to 2016 and now want to decommission my old server 2010.
But i am facing the below issue for uninstalling the exchange server 2010.
Its been a week, tried all the options but still cannot uninstall it.
Hello,
I've built a program that runs on our network to send out emails automatically.
Up until recently it was working fine. Now it cannot connect to office 365.
the function below returns "unable to connect to remote server"
Public Shared Function SendEmail(ByVal eDocType As String, ByVal eDocID As String, ByVal eFrom As String, ByVal eFromPass As String, ByVal eTo As String, ByVal eCC As String, ByVal eBCC As String, ByVal eSubject As String, ByVal eBody As String, ByVal ePDF As String, ByVal eAttachPath As String) As String Try Dim SmtpServer As New SmtpClient("smtp.office365.com", 587) Dim Mail As New MailMessage SmtpServer.UseDefaultCredentials = False SmtpServer.DeliveryMethod = SmtpDeliveryMethod.Network SmtpServer.EnableSsl = True SmtpServer.Credentials = New System.Net.NetworkCredential(eFrom, eFromPass, "OurDomain.com") Mail.From = New MailAddress(eFrom) 'EmailFrom) Mail.To.Add(eTo) Mail.CC.Add(eCC) Mail.Bcc.Add(eBCC) Mail.Subject = eSubject.Trim Mail.Body = eBody Mail.IsBodyHtml = True If ePDF.Trim <> "" Then Dim sb As New StringBuilder sb.Append(ePDF) Dim sr As New StringReader(sb.ToString) Dim pdfDoc As New Document(PageSize.A4, 20.0F, 20.0F, 20.0F, 20.0F) Dim htmlparser As New HTMLWorker(pdfDoc) Using memoryStream As New MemoryStream() Dim writer As PdfWriter = PdfWriter.GetInstance(pdfDoc, memoryStream) pdfDoc.Open() htmlparser.Parse(sr) pdfDoc.Close() Dim bytes As Byte() = memoryStream.ToArray() memoryStream.Close() Mail.Attachments.Add(New Attachment(New MemoryStream(bytes), eDocID + ".pdf")) End Using End If Try If eAttachPath.Contains(";") = False And eAttachPath.Trim <> "" Then If File.Exists(eAttachPath) Then Dim tAttachment As System.Net.Mail.Attachment = New System.Net.Mail.Attachment(eAttachPath) Mail.Attachments.Add(tAttachment) End If Mail.Bcc.Add(eBCC) ElseIf eAttachPath.Contains(";") = True Then Dim eAttachPathList() As String = eAttachPath.Split(";") For x As Integer = 0 To eAttachPathList.Length - 1 If File.Exists(eAttachPathList(x)) Then Dim tAttachment As System.Net.Mail.Attachment = New System.Net.Mail.Attachment(eAttachPathList(x)) Mail.Attachments.Add(tAttachment) End If Next End If Catch ex As Exception End Try SmtpServer.Send(Mail) Archive(eDocType, eDocID, eFrom, eFromPass, eTo, eCC, eBCC, eSubject, ePDF) Catch ex As Exception Return ex.Message End Try Clean() Return "Success" End Function
Did microsoft change their security settings recently?
Hi,
I am trying to sync mails to my application and when I used FindItems function for the sent Items folder, the items returned were missing the Attachments. I will attach the code down below :
SearchFilter.IsNotEqualTo restriction = new SearchFilter.IsNotEqualTo(ItemSchema.ItemClass, "IPM.Schedule.Meeting.Request");SearchFilter.IsGreaterThanOrEqualTo restriction3 = new SearchFilter.IsGreaterThanOrEqualTo(ItemSchema.DateTimeSent, ((DateTime)LatestDate).AddDays(-1));
SearchFilter.SearchFilterCollection restriction4 = new SearchFilter.SearchFilterCollection(Microsoft.Exchange.WebServices.Data.LogicalOperator.And);
restriction4.Add(restriction2);
restriction4.Add(restriction3);
FindItemsResults<Item> sentItems = null;
ExtendedPropertyDefinition extendedProperty = new ExtendedPropertyDefinition(0x1013, MapiPropertyType.String);
PropertySet propertySet = new PropertySet(PropertySet.FirstClassProperties.BasePropertySet, ItemSchema.MimeContent, extendedProperty);
propertySet.RequestedBodyType = BodyType.Text;
sentItems = service.FindItems(WellKnownFolderName.SentItems, restriction4, view);
service.LoadPropertiesForItems(sentItems, propertySet);
When we call GetSearchableMailboxes with no filters we get tens of thousands of results. Examination shows some known mailboxes are missing. Calling it with one of the missing one's name a filter correctly returns that mailbox.
Using powershell Get-Mailbox -ResultSize Unlimited with the same credentials returns more mailboxes than EWS and includes the 'missing' ones.
Any insight into what's going on here? Is it actually possible to get all mailboxes with GetSearchableMailboxes ?
We are creating appointment in Outlook 2013 using EWS API. We want to create appointment which will not be delete by user. Only service can delete these appointment. how we can enable this feature for appointment.(*Appointment should not be delete by user*)
Currently, We are using Lotus notes and We can make appointment read only in notes for users.But API can delete these appointment.
Code:-
ExchangeService exchangeService = objExchangeservice_Conn.fnExchangeService_Conn(); //Create an appointment try { Appointment appointment = new Appointment(exchangeService); //object to create an appointment. appointment.Subject = "Test Meeting "; appointment.Body = "This is test for a appointment"; appointment.Start = DateTime.Now.AddDays(1); appointment.End = appointment.Start.AddHours(1); appointment.Location = "test"; appointment.ReminderDueBy = DateTime.Now; appointment.RequiredAttendees.Add(""); appointment.Save(SendInvitationsMode.SendToNone); Item item = Item.Bind(exchangeService, appointment.Id, new PropertySet(ItemSchema.Subject));
I just downloaded the latest version of Exchange 2019 and ran the setup in existing enviorumnet with
DC windows 2012 r2 standard.
Exchange 2016= windows 2012 R2
Exchange 2019(trying to install on windows 2016 standard). it pop up with this error.
Error.
Error:Do i have to install windows 2019 which is not even officiallyreleased?. Is this a bug or i am missing something.
Hello,
I am looking for a way to create a search folder for every AD user and every future AD user in our domain.
The point is, that we want a folder with certain criteria, the user can use once in a year to delete old e-mails (after checking them for some important mails they want to keep).
Criteria:
- Sent Mails older than 3 months (with attachments)
- Sent Mails containing "ABC" or "DEF" in subject, which are older than 3 months (with attachments)
- Mails bigger than 3 MB which are older than 3 months
So far I have not found a good working way, to deploy a search folder, or use a script for example as logon script to create a search folder.
Can someone help me out or point me into the right direction?
I'd prefer a powershell solution, but VBS would be fine as well.
Hope someone can help, we wish to place the Meeting Room calendar information onto a SharePoint site to basically show the room availability. The SharePoint Developer is using theOutlook REST API, such as;
https://outlook.office.com/api/v2.0/me/calendarview?startDateTime={start_datetime}&endDateTime={end_datetime}
The only difference is that we will point to our On-Premise Exchange Server.
What is the minimum permission required to carry out the above query, I am an Exchange Administrator so please try to answer in terms I understand, namely something like running;
Add-MailboxFolderPermission -Identity MeetingRoom1:\Calendar -User FooBarUser -AccessRights Reviewer
The reason I ask is because I have run the above PowerShell cmdlet against the meeting room in question forthe user that will be running the query and getting the following message;
{"error":{"code":"ErrorInvalidUser","message":"The requested user 'MeetingRoom1@foobar.com' is invalid. REST APIs for this mailbox are currently in preview. You can find more information about the preview REST APIs at https://dev.outlook.com/."}}
We have a java program which uses Basic Authentication to connect to Exchange Server. We use apis of EWS (ews-java-api-2.0.jar).
Program sets the credentials (user name and password) and sets the exchange URL. And reads all users from the Distribution List
Some of the EWS classes which we use for connection and retrieving users from Exchange Server are :
ExchangeService,ExpandGroupResults,WebCredentials,EmailAddress
Now my organization is planning to migrate to O365. The same java code is not working now. Can anybody guide me how to resolve this issue?
Hi,
for the Group Group1 the members are hidden , upon setting HideDLMembership to false shows the members in the ADUC in Group->properties->members is this correct
How can I check the same in Exchange EAC portal for the group Mail2
set-adgroup -id Group1-replace @{hideDLMembership=$true}-Verbose
Is the users part of "Domain Admins" group able to view the memebers irrespective of the flag hideDLMembership set to true or false ?
Is the administrator also able to view all the members of the group irrespective of the flag value hideDLMembership set to true or false
Thanks,
Arathi
i got the alert from scom how we can resolve it !!
Alert: Workflow Initialization: Unable to start a workflow that is running a process or script Source: SRVMBX01 Path: SRVMBX01 Last edited by: Connector Framework Alert Write Action Time last modified: 08/03/2019 06:38:11 Alert Description: The data found
in the result has been aborted because the process's event policy started at 07:37:00 has detected errors.
The "StdErr" strategy expression:
\ A +
corresponded to the following result:
Get-Counter: The specified object was not found on the computer.
At C: \ Program Files \ System Center Operations Manager \ Agent \ Health Ser Vice State \ Monitoring Host Temporary Files 1002 \ 12748 \ Troubleshoot-DatabaseSpac
e.ps1: 125 Character: 39
+ $ logBytesCounter = get-counter <<<< -ComputerName
+ $ database.MountedO
nServer -Counter $ counterName -MaxSamples 10
+ CategoryInfo: InvalidResult: (:) [Get-Counter], Exception
+ FullyQualifiedErrorId: CounterApiError, Micro
Executed command: "C: \ Windows \ System32 \ WindowsPowerShell \ v1.0 \ powershell.exe" -version 2.0 -Command "& '. \ ExecuteDiagnosticScript.ps1' -MonitoringDataSource 'MSExchange Monitoring Troubleshoot-DatabaseSpace' -MaxStartDelaySeconds
'15' - DiagnosticScriptName '. \ Troubleshoot-DatabaseSpace.ps1' -DiagnosticScriptArguments '-Server SRVMBX01 -MonitoringContext' "
Working Directory: C: \ Program Files \ System Center Operations Manager \ Agent \ Health Service \ State Host Monitoring \ Temporary Files 1002 \ 12748 \
Hi,
Is there a way to detect corrupted\bad items in an Exchange 2007\2010 mailbox, may be using EWS or PowerShell + MAPI?
Often Mailbox Moves fails due to corrupted\bad items in mailbox, so we want to know in advance if a mailbox has any bad items. I have searched it many times, but could not find answer. I also have detailed look into:
http://social.technet.microsoft.com/Forums/en-US/exchange2010/thread/728141fb-3a9f-4bb3-a202-d11060b11fb5
http://social.technet.microsoft.com/Forums/en-US/exchange2010/thread/8d78e08b-4ef9-4b28-a322-98a9dbc436e5
but could not find any answer.
Thanks in anticipation.
Laeeq Qazi|Team Lead(Exchange + Sharepoint + BES + DynamicsCRM) www.HostingController.com