Quantcast
Channel: Exchange Server Development forum
Viewing all 7132 articles
Browse latest View live

Microsoft Exchange sample database

$
0
0

Hi,

I am developing an application to analyze the emails from a Microsoft Exchange server using the EWS Management API. I would like to know if there are any Microsoft Exchange 2007/2010 databases available (free or not) for me to download, restore to the server and test my code.

Thanks


Sender Name doesn't appear to the recipients , when the email is sent

$
0
0

Dear Team

for specific purpose  , I am using the message Class in CDO to send emails ,

but the problem is that the sender name or address does not appears ,

here is the code I used

CDO.Message oMessage = new CDO.Message();
ADODB.Stream oStream = new ADODB.Stream();
oStream.Charset = "ascii";
oStream.Open();
oStream.WriteText(MHTmessage);
oMessage.DataSource.OpenObject(oStream, "_Stream");

   ADODB.Fields oFields = oMessage.Configuration.Fields;
   oFields["http://schemas.microsoft.com/cdo/configuration/sendusing"].Value = CDO.CdoSendUsing.cdoSendUsingPort;
   oFields["http://schemas.microsoft.com/cdo/configuration/smtpserver"].Value = smtpAddress;

   oFields.Update();

  oMessage.MimeFormatted = true;
  oMessage.Subject = subject;
  oMessage.Sender = emailFrom;
  oMessage.To = emailTo;
  oMessage.CC = emailcc;

oMessage.Send();

Regards


iqasas

[E2013] [MAPI] Setting GlobalObjid to make calendar invites work

$
0
0

I am creating calendar entries in Office 365 using MAPI (via an Outlook profile connected to
the online account).  The goal is to be able to create entries for multiple users, such that
the organizer of the meeting is able to modify the event (such as the time) and Office 365
will then send out updates to all attendees that will automatically update their calendar.

An additional complication is that some of the attendees are external, not Office 365 users.
So the .ics file that Outlook sends must have the "UID:" field set to the original UID
of the event.

I know this might be better done using Exchange Web Services but that is not an option at
the moment.

My understanding is that I need to set the GlobalObjid and CleanGlobalObjid properties
to be the same value for attendees of a given event. I am familiar with the structure of
that property, and I currently create one using a random number for the unique part of it,
which works fine, except for the update ability.

An experiment I did was to send a meeting request into O365 using an external program, and
take a look at the GlobalObjid that got created, shown below:

04 00 00 00 82 00 e0 00 74 c5 b7 10 1a 82 e0 08   ........t.......
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
00 00 00 00 2d 00 00 00 76 43 61 6c 2d 55 69 64   ....-...vCal-Uid
01 00 00 00 31 65 34 37 66 65 65 63 2d 65 63 61   ....1e47feec-eca
35 2d 34 62 62 39 2d 61 65 61 65 2d 31 32 33 34   5-4bb9-aeae-1234
35 36 37 39 31                                    56791...........

Note that the CreateDate portion of the structure is zero, and the original UID is
preceeded by the string "vCal-Uid" followed by a 32 bit integer with value 1.  Again,
this was created by Office 365.

My thinking was that I could duplicate this structure and everything would work.
I have actually gotten this to work in one of my test Office 365 accounts.  However at
a customer's site, it does not. The organizer makes a modification, and the attendee
gets an email message with the update, but the time is 7 hours prior to the actual
modified time (local TZ is PDT).  Also, the event is a new stand alone, not linked to
the original event.  There are now two entries at different times.

I tried adding in the created date field, to no effect.  I should note that the GlobalObjid
of the new event in the attendees calendar does not have a date, plus the unique portion
of the structure is the same as the original, except there is an added null byte.  It also
has the YH, YL, M and D bytes filled out.

So, any ideas about what I need to do so that O365 attendees get their calendars updated,
and still maintain the ability for external attendees to get the correct UID?  I must
be missing something, but I don't know what.

Convert Internal Mails (TNEF format) to plain text - exchange server

$
0
0

Hello Folks,

I am trying to convert all internal mails (TNEF format) in exchange server to plain text.

i successfully converted the body, but i couldn't convert or change the body format in the TNEF message to plain text which is different than the External mails where we use the headers or content type.

what i get after the conversion of the body without changing the type of the message is the message body contains all the words one after another without the basic formatting...new line at least.

so can anyone advise how to convert the message to plain text in Internal messages which uses the TNEF format and keeping the basic format?

Thanks in advance,

Jamil Isayyed

Problem Sync Calendar Iphone

$
0
0
I'mhaving problemswithcalendar synchronizationof all devicesIphonesmy company,happensthe following situation:

Whenan agendafor theIphonedeviceis created and sentto other recipients, they receiveandaccepteverything worksnormal andisscheduled at theIphonedevice, butthisbookis not transferredto the Exchangeowaand consequentlydoes not appear in Outlookon the user'snotebook.

Managershadcaseslose important meetingsbecause of this problem.

I have installedherein 2013withExchange ServerreplicationDAG.

I will be verygrateful ifsomeone manages togivemea directionto solve thisproblem.

Strange error in auto-discover using EWS...

$
0
0

Hi,

The test environment:

Parent domain: parent.domain.

Child domain: child.parent.domain

SMTP domain: smtp.domain

SIP domain: sip.domain

Test PC join the "child.parent.domain" and login with "child\test1", this account's email address is "test1@sip.domain", outlook in this PC works fine, but EWS raise a exception about getting user settings.

EWS auto-discover code:

AutoDiscoverExchangeWebServices

{

...

_ExchangeService = new ExchangeService(ExchangeVersion.Exchange2007_SP1);
_ExchangeService.TraceEnabled = true;

_ExchangeService.Credentials = new WebCredentials(test1, password, child.parent.domain);

_ExchangeService.AutodiscoverUrl("test1@sip.domain", AutoDiscoverValidationCallback);

...

}

Logs:

=====================AutodiscoverConfiguration======================== 
<Trace Tag="AutodiscoverConfiguration" Tid="34" Time="2012-04-26 10:04:10Z">
Starting SCP lookup for domainName='sip.domain', root path='
</Trace>
=====================AutodiscoverConfiguration========================
<Trace Tag="AutodiscoverConfiguration" Tid="34" Time="2012-04-26 10:04:10Z">
Searching for SCP entries in LDAP://CN=Configuration,DC=parent,DC=domain
</Trace>
=====================AutodiscoverConfiguration========================
<Trace Tag="AutodiscoverConfiguration" Tid="34" Time="2012-04-26 10:04:10Z">
Scanning for SCP pointers Domain=sip.domain
</Trace>
=====================AutodiscoverConfiguration========================
<Trace Tag="AutodiscoverConfiguration" Tid="34" Time="2012-04-26 10:04:10Z">
No SCP pointers found for 'Domain=sip.domain' in configPath='CN=Configuration,DC=parent,DC=domain'
</Trace>
=====================AutodiscoverConfiguration========================
<Trace Tag="AutodiscoverConfiguration" Tid="34" Time="2012-04-26 10:04:10Z">
Scanning for SCP urls for the current computer Site=TEST
</Trace>
=====================AutodiscoverConfiguration========================
<Trace Tag="AutodiscoverConfiguration" Tid="34" Time="2012-04-26 10:04:10Z">
Adding (prio 1) 'https://webmail.domain/autodiscover/autodiscover.xml' for the 'Site=TEST' from 'LDAP://CN=FRSTM11MM1,CN=Autodiscover,CN=Protocols,CN=FRSTM11MM1,CN=Servers,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=Test Systems,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=parent,DC=domain' to the top of the list (exact match)
</Trace>

Message: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
   at System.Collections.ArrayList.get_Item(Int32 index)
   at System.DirectoryServices.ResultPropertyValueCollection.get_Item(Int32 index)
   at Microsoft.Exchange.WebServices.Autodiscover.DirectoryHelper.GetScpUrlList(String domainName, String ldapPath, Int32& maxHops)
   at Microsoft.Exchange.WebServices.Autodiscover.DirectoryHelper.GetAutodiscoverScpUrlsForDomain(String domainName)
   at Microsoft.Exchange.WebServices.Autodiscover.AutodiscoverService.GetAutodiscoverServiceUrls(String domainName, Int32& scpHostCount)
   at Microsoft.Exchange.WebServices.Autodiscover.AutodiscoverService.InternalGetLegacyUserSettings[TSettings](String emailAddress, List`1 redirectionEmailAddresses, Int32& currentHop)
   at Microsoft.Exchange.WebServices.Autodiscover.AutodiscoverService.GetLegacyUserSettings[TSettings](String emailAddress)
   at Microsoft.Exchange.WebServices.Autodiscover.AutodiscoverService.InternalGetLegacyUserSettings(String emailAddress, List`1 requestedSettings)
   at Microsoft.Exchange.WebServices.Autodiscover.AutodiscoverService.GetUserSettings(String userSmtpAddress, UserSettingName[] userSettingNames)
   at Microsoft.Exchange.WebServices.Data.ExchangeService.GetAutodiscoverUrl(String emailAddress, ExchangeVersion requestedServerVersion, AutodiscoverRedirectionUrlValidationCallback validateRedirectionUrlCallback)
   at Microsoft.Exchange.WebServices.Data.ExchangeService.AutodiscoverUrl(String emailAddress, AutodiscoverRedirectionUrlValidationCallback validateRedirectionUrlCallback)
   at SelfExchangeService.AutoDiscoverExchangeWebServices(String emailaddr) -- Priority: 0 --Severity: Critical--ProcessId: 2688--Win32 ThreadId:3360

This looks like some error in server configuration. How is exception raised? Where to check the configurations?

Thanks very much.


Send meeting invite to only changed attendees.

$
0
0

Hi,

I use EWS library.
I have to create new appointment and send invitations to some attendees.
Than I need add or delete an attendee and send invitation to only changed attendee.

I found an article on MSDN and tried to do it in test project:

    public partial class Form1 : Form
    {
        private const string OFFICE_365 = "Office365_email@aa.com";
        private const string GMAIL_1 = "Gmail1@gmail.com";
        private const string GMAIL_2 = "Gmail2@gmail.com";

        private ExchangeService _exchangeService;
        private ItemId _itemId;

        public ExchangeService ExchangeService
        {
            get
            {
                if (_exchangeService == null)
                {
                    _exchangeService = new ExchangeService(ExchangeVersion.Exchange2013_SP1)
                    {
                        Credentials = new WebCredentials("sender@aa.com", "pass"),
                        Url = new Uri(@"https://outlook.office365.com/EWS/Exchange.asmx")
                    };
                }
                return _exchangeService;
            }
        }

        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            Appointment appointment = new Appointment(ExchangeService);
            appointment.Start = DateTime.Now.AddDays(2);
            appointment.End = appointment.Start.AddHours(2);
            appointment.Subject = DateTime.Now.Ticks.ToString();
            appointment.RequiredAttendees.Add(OFFICE_365);
            appointment.RequiredAttendees.Add(GMAIL_1);
            appointment.RequiredAttendees.Add(GMAIL_2);

            appointment.Save(SendInvitationsMode.SendToAllAndSaveCopy);

            _itemId = appointment.Id;

            MessageBox.Show("Done");
        }

        private void button2_Click(object sender, EventArgs e)
        {
            Appointment appointment = Appointment.Bind(ExchangeService, _itemId);

            appointment.RequiredAttendees.RemoveAt(0);

            appointment.Update(ConflictResolutionMode.AlwaysOverwrite, SendInvitationsOrCancellationsMode.SendOnlyToChanged);
            MessageBox.Show("Done");
        }
    }


It doesn't work properly!!  - When I update appointment (button2_Click) I receive invitation for all attendees! :(

I looked for the same provblem and found an article on StackOverflow.
I tried to do it but it still doesn't work.

I use EWS 2.2 the last version: 15.0.913.15

How can I fix it?
Any ideas?

Thanks.

Send meeting invitation to changed attendees only.

$
0
0

Hi,

I use EWS library.
I have to create new appointment and send invitations to some attendees.
Than I need add or delete an attendee and send invitation to only changed attendee.

I found an article on MSDN and tried to do it in test project:

    public partial class Form1 : Form
    {
        private const string OFFICE_365 = "Office365_email@aa.com";
        private const string GMAIL_1 = "Gmail1@gmail.com";
        private const string GMAIL_2 = "Gmail2@gmail.com";

        private ExchangeService _exchangeService;
        private ItemId _itemId;

        public ExchangeService ExchangeService
        {
            get
            {
                if (_exchangeService == null)
                {
                    _exchangeService = new ExchangeService(ExchangeVersion.Exchange2013_SP1)
                    {
                        Credentials = new WebCredentials("sender@aa.com", "pass"),
                        Url = new Uri(@"https://outlook.office365.com/EWS/Exchange.asmx")
                    };
                }
                return _exchangeService;
            }
        }

        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            Appointment appointment = new Appointment(ExchangeService);
            appointment.Start = DateTime.Now.AddDays(2);
            appointment.End = appointment.Start.AddHours(2);
            appointment.Subject = DateTime.Now.Ticks.ToString();
            appointment.RequiredAttendees.Add(OFFICE_365);
            appointment.RequiredAttendees.Add(GMAIL_1);
            appointment.RequiredAttendees.Add(GMAIL_2);

            appointment.Save(SendInvitationsMode.SendToAllAndSaveCopy);

            _itemId = appointment.Id;

            MessageBox.Show("Done");
        }

        private void button2_Click(object sender, EventArgs e)
        {
            Appointment appointment = Appointment.Bind(ExchangeService, _itemId);

            appointment.RequiredAttendees.RemoveAt(0);

            appointment.Update(ConflictResolutionMode.AlwaysOverwrite, SendInvitationsOrCancellationsMode.SendOnlyToChanged);
            MessageBox.Show("Done");
        }
    }


It doesn't work properly!!  - When I update appointment (button2_Click) I receive invitation for all attendees! :(

I looked for the same provblem and found an article on StackOverflow.
I tried to do it but it still doesn't work.

I use EWS 2.2 the last version: 15.0.913.15

How can I fix it?
Any ideas?

Thanks.



OriginalStart of a meeting request

$
0
0

Hi,

I am using EWS Managed API and on FullUpdate of a meeting request I am trying to figure out the old start time of the meeting so that i can delete it from my local cache.

For this purpose i tried to read the value from OriginalStart field but its not being returned from the server, even after explicitly asking it using the property set.

1. Does OriginalStart correct field to use in this scenario?

2. If not, how can I retrieve the old meeting?

Note: I am using ExchangeVersion.Exchange2010_SP2

Thanks & Regards,

Ashwin Patti

List of all error codes returned by EWS

$
0
0

Hi everybody,

I need all the EWS error codes returned by Exchange when we use Exchange Web Services.

Thanks & regards,

Amit Jha

EWS Managed API - Updating contact's business address is not working

$
0
0
I am following the sample https://msdn.microsoft.com/en-us/library/office/ee693002%28v=exchg.80%29.aspx and try to update contact's business address and it is not working. Is it a known issue?

Autodiscover request from computer not in domain

$
0
0

Hi everybody,

I am sending autodiscover request from a computer not in domain. Can somebody help me how to do this? Autodiscover request is successful when sent from a computer which is in domain. I have mixed environment of one Exchange Server 2007, one Exchange Server 2010 and two Exchange Server 2013. Kindly help me in this matter.

Thanks & regards,

Amit Jha

Exchange Server 2013 EMail Driver

$
0
0

I have a C# program that connects to my Exchange Server 2010 and is able to read every email.

I am using the microsoft.exchange.webservices.dll library.

The problem is, that this program gives back the following exception on Exchange Server 2013: "The remote server returned an error: (501) Not Implemented."

I have no idea what's the difference between these 2 servers.

Some Code Snippets:

ExchangeVersion version = ExchangeVersion.Exchange2013; ExchangeService service = new ExchangeService(version); service.Credentials = new NetworkCredential("user", "pw", "domain"); service.AutodiscoverUrl("emailaddr");

and here happens the exception:

SearchFilter sf = new SearchFilter.SearchFilterCollection(LogicalOperator.And, new SearchFilter.IsEqualTo(EmailMessageSchema.IsRead, false));

FindItemsResults<Item> findResults = service.FindItems(WellKnownFolderName.Inbox, sf, new ItemView(20));

service.LoadPropertiesForItems(findResults.Items, PropertySet.FirstClassProperties);

string mailsender = item.LastModifiedName;



configure Exchange Impersonation in exchange 2010

$
0
0

I want to configure application Impersonation for service account so that group of  mailboxes can be accessed through this service account.

Let us say, my application\service account is- skyWipro

I want application Impersonation for following group of user- sky12, sky13, sky14, sky15,sky16

Then how can I configure application Impersonation?

Please let me know all command what need to run?

 

I found below command but not sure how can I run these for above condition- 

New-ManagementScope –Name:scopeName –RecipientRestrictionFilter:recipientFilter

 

New-ManagementRoleAssignment –Name:impersonationAssignmentName –Role:ApplicationImpersonation –User:serviceAccount –CustomRecipientWriteScope:scopeName

Public folder in exchange 2010

$
0
0
I have made two script for public folder in exchange 2010.
One script give me all the public folder list and other script give me owner list of all public folder.
 
Get-PublicFolderStatistics -ResultSize Unlimited |  where {$_.LastUserAccessTime -lt (get-date).AddDays(-90)}
 
Get-PublicFolderStatistics -ResultSize Unlimited | Get-PublicFolderClientPermission | Where {($_.AccessRights -eq "Owner"}
 
Can I merge these two script in single one so I have single excel having public folder lists and their owner?
 

 


ActiveSync PPT

$
0
0
Please give me active sync PPT for exchange 2010.

[E2013][MailApp] mailbox.makeEwsRequestAsync GetItem cannot access public folder item

$
0
0

We developed an Office Mail App for Exchange 2013 which needs to read some custom properties of the currently selected mail item.

We use makeEwsRequestAsync with a GetItem request and that works without problems when the item sits in the current users mailbox.

When the user added a public folder to his Favorites, selects a message in that folder and activates our Mail App the GetItem request returns an error which contains this:

<m:ResponseCode>ErrorAccessDenied</m:ResponseCode>

The error message is always in german, setting the mailbox language in OWA to en-us didn't change that. This is the error message:

Mit der Nebenstellennummer sollte nur auf das Act-As-Benutzerpostfach zugegriffen werden.

Something like: With the extension number you should only access the act-as-user mailbox

Any ideas how to access public folder items?

The Public Folder btw is located on Exchange 2013, the same server as the user mailbox.

--

SvenC


-- SvenC

Streaming Notifications Limits

$
0
0

Hi All,

I am working on an application which requires me to write a service that filters new Calendar appointment objects to a Database running on an external server. I would like to do this for all the Users within the Exchange Server.

When conducting my research I came across the "StreaningSubscriptionConnection" limit (30 minutes)

Since the EWS Managed API is an open source project this could be adjusted, but in order for me to proceed with my project I would like to know if there is a reason for this time limit.

And also why there hasn't been a Possibilty that introduces a Streaming Subscription for all users at.

Hopefully some of you will help me further in my research.

Thank you !


Raed the latest message from an email thread

$
0
0

Hi,

Can I extract the latest message from an email thread in Exchange Transport Agent in Exchange 2013? For example. if someone replied to my email, I want to get the only text the other person added when he/she replied to my email (when intercept in Exchange transport agent).

Help will be very much appreciated.

Thanks.



[EWS] How to create and immediately accept appointments for attendees?

$
0
0

I'm using EWS to create appointments with an organizer and an attendee.  I need to "force" these appointments on their calendars, so I don't want to send them notifications or have them "accept" the meeting.  The attendees are scheduling these appointments through another interface, so accepting the meeting would be a duplicate action that we can't have.  

Creating the appointment is fine and I'm using SendInvitationsMode.SendToNone to suppress the notifications.  My plan was to immediately "accept" the meeting for them, using Appointment.Accept.  However, I'm not sure how to find the new appointment on the attendee's calendar.  If I use CalendarFolder.FindAppointments to get their appointments for the given date, this new un-accepted appointment isn't returned.  Any ideas?  Ideally, I'd love to get a list of associated appointment UIDs when creating the new appointment.  But I'd even settle for searching their calendar to find the correct appointment.  I just don't see the new appointment when I search so I'm at a loss.  

I cannot change their calendars to auto-accept since they will still receive invitations from other users as normal.  I also can't create separate appointments on their calendars since I want the organizer to have the option to cancel the meeting from Outlook.  

Thanks in advance!



Viewing all 7132 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>