none
Read email from Universal distribution groups once new mail received in outlook group RRS feed

  • Question

  • #1. I am able to read the outlook emails of particular person from their respective mailbox Folders.
    e.g.

    Session emailSession = Session.getInstance(properties);
    Store emailStore = (IMAPSSLStore) emailSession.getStore(protocol);
    IMAPFolder emailFolder = (IMAPFolder) emailStore.getFolder("INBOX");

    #2. I have read the already created Universal distribution groups and its members using:

    e.g.

    EmailAddress emailAddress = new EmailAddress();
    emailAddress.setName("SUPPORT");
    emailAddress.setAddress(groupEmail);
    ExpandGroupResults results = service.expandGroup(emailAddress);
    if (!StringUtils.isEmpty(results.getMembers())) {
        results.getMembers().forEach(new Consumer<EmailAddress>() {
            @Override
            public void accept(EmailAddress address) {
                System.out.println(address);
            }
        });
    }

    #3. The ticket should be created when a new email received by Universal distribution groups and sent it to actual caller from Universal distribution groups itself. To achieve this, I have came across to first step to read the email received by Universal distribution groups . And I looked through the
    Microsoft Exchange EWS API documentation but did not find any API to read the email received in Universal distribution group.

    Can somebody give me insights on this??
    Your sharing appreciable !! 

    Thank you.


    Tuesday, January 21, 2020 12:07 PM

Answers

All replies

  • Hi Suraj Savaratkar,

    Based on your description, your issue is related to Microsoft Exchange EWS API. Since Exchange server forum mainly discusses and provide suggestions about Exchange server issues, we will help you move this case to Exchange Server > Exchange Server Development forum. You will get more professional suggestions there. Thanks for your understanding.

    Regards,

    Lydia Zhou


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    Wednesday, January 22, 2020 2:24 AM
  • Thank you, Lydia Zhou for moving this issue to Exchange Server > Exchange Server Development on behalf of me.

    Wednesday, January 22, 2020 4:37 AM
  • >>Microsoft Exchange EWS API documentation but did not find any API to read the email received in Universal distribution group.

    As with any distribution group they don't receive and store email, they are a directory object which the Exchange server expands and then delivers a copy of the email sent to the distribution list to each of its members. So if you want to read a Message sent to UDG (or any dll)you need to read it from the Mailbox of one its members.  

    The only other way of doing it is an Exchange Transport Agent which can intercept the Message while its in the Transport pipeline (eg pre-expansion and delivery to the members)

    Cheers
    Glen

    Wednesday, January 22, 2020 11:09 PM
  • Thank you, Glen Scales for your valuable information.

    But, I do not have privilege to create those Exchange Transport Agent configuration and I want to achieve it through the Java code.

    Can you please give me some details on below points:

    1. Read the email using outlook listeners.
    2. Create an Mailbox for distribution group

    Thank you!



    Tuesday, January 28, 2020 12:14 PM
  • Read the email using outlook listeners.

    EWS notification are probably what you want there is a ews managed API for java you should be able to use for that

    https://docs.microsoft.com/en-us/exchange/client-developer/exchange-web-services/notification-subscriptions-mailbox-events-and-ews-in-exchange

    >Create an Mailbox for distribution group

     Not possible and its not the way distribution groups work

    Why don't you just create a new Service Account mailbox and add that to each UDG you want to receive email for. Then any time a message is sent to the UDG that member will receive mail like every other member of the UDG. You could also create Mail Flow rule to add a BCC

    Tuesday, January 28, 2020 11:24 PM
  • Thank you, Glen Scales for your valuable information.
    Monday, February 3, 2020 10:46 AM