Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
thanhlv93
@thanhlv93
i'm using Android studio should haven't
<dependency>
<groupId>com.microsoft.ews-java-api</groupId>
<artifactId>ews-java-api</artifactId>
<version>2.0</version>
</dependency>
thanhlv93
@thanhlv93
I'm using Ews version 2.0 but exeption thrown :
Caused by: java.lang.NoSuchFieldError: org.apache.http.conn.ssl.AllowAllHostnameVerifier.INSTANCE
Plz , I needed a solution .
thanhlv93
@thanhlv93
Ews version 2.0 have support on Android ?
DanielPio89
@DanielPio89
Hi, does anyone know how i can get the appointmnets of a shared calendar with ews-java-api? I have tried to use this code and rewrite it to java but it throws an exception
java.lang.ClassCastException: microsoft.exchange.webservices.data.ExtendedPropertyDefinition cannot be cast to microsoft.exchange.webservices.data.PropertyDefinition in itItem.tryGetProperty(PidTagWlinkAddressBookEID, WlinkAddressBookEID)
pratibhapandey01
@pratibhapandey01
Hello Everyone
When I try to do appointment.load in a multi-threaded environment I get microsoft.exchange.webservices.data.core.exception.service.remote.ServiceRequestException: The request failed. Connection is still allocated
Jose Carlos
@josecyn
@DanielPio89 perhaps this function helps you to find it out:
    private static void searchCalendars (ExchangeService service, ArrayList<OutlookCalendar> output, ArrayList<Folder> folders, String sangria) {
        try {
            System.out.println(sangria+"The count of Subfolders: "+folders.size());
            int counter = 1;
            for (Folder folder : folders) {
                if (folder instanceof CalendarFolder) {
                    System.out.println(sangria+"#" + counter + " \"" + folder.getDisplayName() + "\" is a calendar folder!");
                    System.out.println(sangria+"-----> Found calendar named \"" + folder.getDisplayName() + "\" which has "+folder.getTotalCount()+" appointment(s) and id: " + folder.getId() + "\n");
                    output.add(new OutlookCalendar(folder.getId().getUniqueId(), folder.getDisplayName()));
                    FindFoldersResults next = service.findFolders(folder.getId(), new FolderView(Integer.MAX_VALUE));
                    searchCalendars (service, output, next.getFolders(), sangria+"\t");
                }
                else {
                    if (folder.getChildFolderCount() > 0) {
                        System.out.println(sangria+"#" + counter + " \"" +folder.getDisplayName() + "\" is not a calendar folder but it has "+folder.getChildFolderCount()+" subfolders. We resume the search inside this folder... ");
                        try {
                            FindFoldersResults result = service.findFolders(folder.getId(), new FolderView(Integer.MAX_VALUE));
                            searchCalendars (service, output, result.getFolders(), sangria+"\t");
                        }
                        catch (ServiceResponseException e) {
                            System.err.println(sangria+"Exception occurred: "+e.getMessage() + "\n");
                        }
                    }
                    else {
                        System.out.println(sangria+"#" + counter + " \"" +folder.getDisplayName() + "\" has 0 subfolders. Search in this folder finished!\n");
                    }
                }
                counter++;
            }
        }
        catch (Exception e) {
            System.out.println("Error searching appointments");
            e.printStackTrace();
        }
    }
Jose Carlos
@josecyn

@DanielPio89 and this is how you can call it:

searchCalendars(exchangeService, output, exchangeService.findFolders(WellKnownFolderName.Root, new FolderView(Integer.MAX_VALUE)).getFolders(), "");

Pathikrit Bhowmick
@pathikrit
hi, i posted on stackoverflow a question regarding why i am getting ErrorMeetingRequestIsOutOfDate when I try to accept a meeting request via the java api...
Please take a look: http://stackoverflow.com/questions/34663896/ews-java-api-the-meeting-request-is-out-of-date-the-calendar-couldnt-be-updat
Cody Moore
@dotCipher
Is there a way to get appointments that are deleted? Or lookup an appointment to see if it has been deleted?
indriesergiu
@indriesergiu
Hi, is there any info the next release date? (2.1)
Thanks
indriesergiu
@indriesergiu
@pratibhapandey01 ExchangeService is not thread safe. See the links below
OfficeDev/ews-java-api#371
OfficeDev/ews-java-api#428
OfficeDev/ews-java-api#491
Kevin Fawcett
@fawcett888
Anyone online?
Kevin Fawcett
@fawcett888
Is anyone here?
Ali Fahim
@hurricaneffs
Anyone here?
Zoltán Adamek
@scorchio
Hi everyone. I've just opened OfficeDev/ews-java-api#542 and I would really appreciate if someone who knows a bit more about the possible authentication methods in EWS could check this. I'm pretty sure that it could be helpful for others as well, as I've already found some similar issues in the queue.
HassineBM
@hsine55
Hi guys. Can we use this library with exchange 2016 ?
Luis Montiel
@luismmontielg
Hello everyone, is it possible to fetch all emails after a given email id? Or received after certain date?
PraveenKumarKR
@PraveenKumarKR
Hi All
I wrote a code for getting OOO setting of user
code throws below error

import java.net.URI;

import microsoft.exchange.webservices.data.core.ExchangeService;
import microsoft.exchange.webservices.data.core.enumeration.misc.ExchangeVersion;
import microsoft.exchange.webservices.data.credential.ExchangeCredentials;
import microsoft.exchange.webservices.data.credential.WebCredentials;
import microsoft.exchange.webservices.data.property.complex.availability.OofSettings;

public class GetOOO {

public static void main(String[] args)
{
try
{
ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010_SP2);
service.setTraceEnabled(true);
service.setUrl(new URI("https://email.xxx.com/EWS/Exchange.asmx"));

      ExchangeCredentials credentials = new WebCredentials("<<superUserId>>", "<<SuperUserPassword>>","XXX");
      service.setCredentials(credentials);

      OofSettings myOOFSettings = service.getUserOofSettings("<<emailId>>");

      System.out.println(myOOFSettings.getState());


      service.close();
}
catch (Exception e)
{

    System.out.println(e.getMessage());
    e.printStackTrace();
}

}
}

Error in [GetOOOSettings.process/Java Code]While executing [invoke] encountered [microsoft.exchange.webservices.data.core.exception.service.remote.ServiceRequestException] : [The request failed. null at microsoft.exchange.webservices.data.core.request.SimpleServiceRequestBase.internalExecute(SimpleServiceRequestBase.java:74)
please help
Vadik
@bboybboy
does this library work with android?
Francisco Montiel
@franciscomontiel
Hi ! is there a way to get all the emails in the conversation from a specific emailId? or is there a way to get the Convarsation Object by a ConversationId object? Thanks !
jgranduel
@jgranduel
Hi! I'm searching a way to get shared calendars. AFAIK, I need to get PR_WLINK_ENTRYID (pidtagwlinkEntryId) that I should decode from binary and then get the corresponding ewsid. If that's correct, would you mind providing a snippet? (I posted on SOF https://stackoverflow.com/questions/39920641/ews-access-shared-calendars-items-appointments, got PidtagwlinkEntryId from MFCMapi, but need to make the process automatic, preferably in Java).
mohitsoni1985
@mohitsoni1985
Hi , I want add Calendar Events into Outlook 2010 through Programatically (JAVA) how i can do that??
softashu
@softashu
Hi iis there any possibility to notify event modification in outlook exchange?
how client application get notification about event modify under exchange calendar
Magdy Abdel
@kosumosushi
Hi there, I wanted to ask if I can find a javadoc anywhere ?
lasha
@lashakv

Hi guys. Can anyone help me with a question, please? I am playing around with EWS Java Api and currently I'm trying to understand one thing.
If I loop through some items in Sent Items folder, I won't see any Emails that have: getIsFromMe() == true or getIsSubmitted() == true.
As per docs:
getIsFromMe():

  • Gets a value indicating whether the item has been sent by the current
  • authenticated user.

getIsSubmitted():

  • Gets a value indicating whether the message has been submitted to be sent.
    Aren't those values suppose to be True in Sent Items folder? If no, how can I check that Email was sent?
RimashMohomed
@RimashMohomed
@serious6 Can we use this to send email using Non-Microsoft Server?
solmaz
@soolmazr_twitter
Hi, can anyone help me please...
I have implemented a Liferay calendar portlet. I have started with ews-java-api 2.0. For testing, I gave always username/password as Hard-Code in my Code.
and Now I want to test it with signed in Liferay user. The problem is that Liferay gives me only the username and the encrypted password.
How can I do ews-authentication without forcing user to login again?
Amit Joshi
@A-Joshi
Hello
We have built a basic javax-mail provider for EWS using the EWS API and were looking to opensource it
Seemed like putting it with the ews-java api would be the best spot. Wanted to check if the OfficeDev team would be willing to host it?
retor
@retor
Hello to all. Who can explane how to subscribe to pull notifications to Calendar folder?
Jose Carlos
@josecyn

@retor I did that a while ago, but maybe it helps you.

Subscribe to pull events:

        List  folder = new ArrayList();
        folder.add(new FolderId().getFolderIdFromWellKnownFolderName(WellKnownFolderName.Calendar));

        PullSubscription subscription = ExchangeClient.getExchangeService().subscribeToPullNotifications(folder,5, /* timeOut: the subscription will end if the server is not polled within 5 minutes. */
                null, /* watermark: null to start a new subscription. */
                EventType.Created,
                EventType.Modified,
                EventType.Deleted);

        LOG.info("Subscription successful Id: ! "+subscription.getId() + " - Watermark: ! "+subscription.getWaterMark());
        LOG.info("Starting thread...");
        new Thread(new RetrieveEvents(subscription)).start();

RetrieveEvents thread:

    @Override
    public void run() {
        LOG.info("Thread started!");
        try {
            LOG.info("Sleeping...");
            sleep (60000);
            LOG.info("Awake! Let's check the events!");
            // Wait a couple minutes, then poll the server for new events.
            GetEventsResults events = subscription.getEvents();

            if (events != null && events.getItemEvents() != null && events.getAllEvents().size() > 0) {
                // Loop through all item-related events.
                for (ItemEvent itemEvent : events.getItemEvents()) {
                    LOG.info("itemEvent id: " + itemEvent.getItemId());
                }
            }
            else {
                LOG.info("No result! :(");
            }
        }
        catch (Exception e) {
            LOG.error("Exception", e);
        }
    }
retor
@retor
@josecyn thanks. Tomorrow I understand how to do it. And I do it on RxJava.
Here subscription is an object on server, what store updates and I can retrieve any updates from them.
Thanks
Sorry for my English. Yesterday not tomorrow)))))
Gervais Blaise
@gervaisb
Hello there. Sorry to disrupt but I'm wondering if there is some way to search for all Tasks in one mailbox.
I can get some tasks form the WellKnownFolerName.Tasks but I have some task created form mails but cannot find them.
Gervais Blaise
@gervaisb
At this time I'm able to get tasks from WellKnownFolderName.Tasks and I was able to get all EmailMessage from WellKnownFolderName.Inbox that have the follow-up flag via one extended property: new ExtendedPropertyDefinition(0x1090, MapiPropertyType.Integer)
Jatinder Malik
@jitu330
Hello Guys, not sure if this question has been asked before - I am trying to use this API and create a Java REST micro service using this which can work with user calendars .. but I don't want the web client to pass me users username and password and instead used windows SSO authentication and pass me the token (NTLM maybe) which I can use in microservice to connect to exchange using ews java API - do you think the same is possible? Are there any references you can point me to using which I can build this scenario locally?
amarnath111
@amarnath111
Hello Guys,
I am working on a project and need some help with the java api. I need "Add and remove email addresses from the Blocked Senders List by using EWS in Exchange" as mentioned in this link