Send email to distribution list using OOP...

Hello Experts,
I currently have a requirement to send email(w/o attachment) to a distribution list or specific user. I have searched the forum and it doesnt suit my requirement as the examples gives only how to send email to specific user/s. Any inputs would be appreciated.
Thank you guys and take care!

Hi ,
For sending mail with attachments in multiple sheets of an excel document please see the
sample code below:
REPORT  ZBC_ITAB_TO_EXCEL_NEW                   .
CLASS: cl_abap_char_utilities DEFINITION LOAD.
DATA: docdata LIKE sodocchgi1,
      objpack LIKE sopcklsti1 OCCURS 1 WITH HEADER LINE,
      objtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE,
      objbin1 LIKE solisti1 OCCURS 10 WITH HEADER LINE,
      objbin2 LIKE solisti1 OCCURS 10 WITH HEADER LINE,
      objbin_final LIKE solisti1 OCCURS 10 WITH HEADER LINE,
      reclist LIKE somlreci1 OCCURS 1 WITH HEADER LINE,
      tab_lines TYPE sy-tabix.
DATA: gd_sender_type LIKE soextreci1-adr_typ.
DATA: c_tab TYPE c VALUE cl_abap_char_utilities=>horizontal_tab,
      c_ret TYPE c VALUE cl_abap_char_utilities=>cr_lf.
DATA: c_dev TYPE sy-sysid.
DATA: BEGIN OF i_data OCCURS 0,
      a(20),
      b(20),
      END OF i_data.
DATA: BEGIN OF st,
      f1(2) TYPE c,
      f2(2) TYPE n,
      END OF st.
DATA: itab1 LIKE TABLE OF st WITH HEADER LINE,
      itab2 LIKE TABLE OF st WITH HEADER LINE.
DATA: n TYPE i.
PARAMETER: p_email1 LIKE somlreci1-receiver
           p_sender LIKE somlreci1-receiver.
START-OF-SELECTION.
  itab1-f1 = 'AA'. itab1-f2 = '01'. APPEND itab1.
  itab1-f1 = 'BB'. itab1-f2 = '02'. APPEND itab1.
  itab1-f1 = 'CC'. itab1-f2 = '03'. APPEND itab1.
  itab2-f1 = 'ZZ'. itab2-f2 = '26'. APPEND itab2.
  itab2-f1 = 'YY'. itab2-f2 = '25'. APPEND itab2.
  LOOP AT itab1.
    CONCATENATE itab1-f1 itab1-f2 INTO objbin1 separated BY c_tab.
    CONCATENATE c_ret objbin1 INTO objbin1.
    APPEND objbin1.
  ENDLOOP.
  LOOP AT itab2.
    CONCATENATE itab2-f1 itab2-f2 INTO objbin2 separated BY c_tab.
    CONCATENATE c_ret objbin2 INTO objbin2.
    APPEND objbin2.
  ENDLOOP.
  LOOP AT objbin1.
    MOVE objbin1-line TO objbin_final-line.
    APPEND objbin_final.
  ENDLOOP.
  LOOP AT objbin2.
    MOVE objbin2-line TO objbin_final-line.
    APPEND objbin_final.
  ENDLOOP.
  PERFORM process_email.
  c_dev = sy-sysid.
  IF sy-sysid = c_dev.
    wait up to 5 seconds.
    SUBMIT rsconn01 WITH mode = 'INT'
    WITH output = 'X'
    AND RETURN.
  ENDIF.
  IF sy-subrc = 0.
    WRITE: / 'Email succesfilly delivered'.
  ELSE.
    WRITE: / 'failure'.
  ENDIF.
*&      Form  process_email
*       text
FORM process_email.
  IF p_sender EQ space.
    gd_sender_type = space.
  ELSE.
    gd_sender_type = 'INT'.
  ENDIF.
*Body
  docdata-obj_name = 'Mail_Excel_File'.
  docdata-obj_descr = 'Excel file attachment'.
  objtxt = 'Attached is the sample Excel file'.
  APPEND objtxt.
  DESCRIBE TABLE objtxt LINES tab_lines.
  READ TABLE objtxt INDEX tab_lines.
  docdata-doc_size = ( tab_lines - 1 ) * 255 + strlen( objtxt ).
  CLEAR objpack-transf_bin.
  objpack-head_start = 1.
  objpack-head_num = 0.
  objpack-body_start = 1.
  objpack-body_num = tab_lines.
  objpack-doc_type = 'RAW'.
  APPEND objpack.
*Attachment
  n = 1.
  DESCRIBE TABLE objbin1 LINES tab_lines.
  objpack-doc_size = tab_lines * 255.
  objpack-transf_bin = 'X'.
  objpack-head_start = 1.
  objpack-head_num = 1.
  objpack-body_start = n.
  objpack-body_num = tab_lines.
  objpack-doc_type = 'XLS'.
  docdata-obj_name = 'Excel_File_Attachment1'.
  objpack-obj_descr = 'Excel File Attachment1'.
  APPEND objpack.
  n = n + tab_lines.
  DESCRIBE TABLE objbin2 LINES tab_lines.
  objpack-doc_size = tab_lines * 255.
  objpack-transf_bin = 'X'.
  objpack-head_start = 1.
  objpack-head_num = 1.
  objpack-body_start = n.
  objpack-body_num = tab_lines.
  objpack-doc_type = 'XLS'.
  docdata-obj_name = 'Excel_File_Attachment2'.
  objpack-obj_descr = 'Excel File Attachment2'.
  APPEND objpack.
*Create the list of recipients
  reclist-receiver = p_email1.
  reclist-rec_type = 'U'.
  reclist-express = 'X'.
  APPEND reclist.                 "For sending mail to multiple ids append this internal table with your reqd ids
*Send the e-mail
  CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
      document_data              = docdata
      put_in_outbox              = 'X'
      commit_work                = 'X'
    TABLES
      packing_list               = objpack
      contents_bin               = objbin_final
      contents_txt               = objtxt
      receivers                  = reclist
    EXCEPTIONS
      too_many_receivers         = 1
      document_not_sent          = 2
      document_type_not_exist    = 3
      operation_no_authorization = 4
      parameter_error            = 5
      x_error                    = 6
      enqueue_error              = 7
      OTHERS                     = 8.
  COMMIT WORK.
ENDFORM.                    "process_email
Hope it helps,
Regards
Mansi
Edited by: MANSI  ASNANI on Oct 13, 2009 7:56 AM

Similar Messages

  • Is it posible send email to distribution list like group of mails

    Hi ,
    i need to know if its possible to send email to distribution list via SAP
    please let me know the process or program to do so or how to develop it? let me know if its possible by sap or not?
    regards
    ARORA

    Agree with Zarko. But when you add contact for that external user and allow only that sender, the DL will not receive emails from any other users (internal or external).
    If you added any entries under "Accept mesages only from Only sendes in below list" then only the entries added will be able to send mail to that DL whether the check box "Require that all senders are authenticated" is selected or not. You may check the
    below technet article for more details.
    http://technet.microsoft.com/en-us/library/bb124405(EXCHG.80).aspx

  • Send email to distribution list.

    i have a problem in sending email to a distribution list.
    distribution list can be private or shared folders distribution list.
    how to get all email id from the distribution list.
    how the SO_NEW_DOCUMENT_ATT_SEND_API1 function module can be used in this scenario.
    i have send email to multiple receivers using this function module SO_NEW_DOCUMENT_ATT_SEND_API1 but content or information are same. this scenario information i am going to send differs for each email ids.
    plz help me in this scenario.
    regards,
    suresh

    Suresh
    In short, here are the steps:
    Before you Call function 'SO_NEW_DOCUMENT_ATT_SEND_API1' in your internal table passed for "receivers" i.e. for email ids set:
    receivers-rec_type = 'C' for Shared distribution list or
    receivers-rec_type = 'P' for Private distribution list.
    and
    receivers-receiver = <Distribution list name>
    append receivers internal table.
    Thats it..all email ids within your distribution list should get the email. This will work.
    Let us know if any problems.
    Thanks
    Anand

  • Send mail to distribution list using UTL_MAIL.SEND

    Oracle 10.2.0.4.0
    Does UTL_MAIL.SEND support sending mail to a distribution list?. The doc says, the recipient mail-id should be separated by a comma. The distribution list has mail-id separated by a comma. I executed a test case sending a mail to a distribution list, I did not receive any error or exception. I did not receive the test mail as well!!.
    Has anyone used the UTL_MAIL.SEND to send mails to a distribution list?.
    Thanks

    Has anyone used the UTL_MAIL.SEND to send mails to a distribution list?.Oracle RDBMS does not know or care is email address is single recipient or list.
    It sends message to name provided.
    It is up to MTA to deliver any message it gets.
    Are you 100% certain that message got to MTA & was successfully processed by it?

  • How to send spool to Distribution List using JOB_CLOSE

    Please help on sending Distribution list when job defined using JOB_OPEN, JOB_Submit and JOB_CLOSE
    Thanks.

    Hi, this is code:
    DATA  WA_RECIPIENT LIKE swotobjid.
    CONSTANTS:  gc_objname  TYPE oj_name    VALUE 'RECIPIENT'.
    PERFORM get_distribucion_list USING    'NAME_LIST'   " name of List of distribution
                                  CHANGING WA_RECIPIENT.
    CALL FUNCTION 'JOB_CLOSE'
    EXPORTING
          jobcount                          = l_jobcount
          jobname                           = l_jobname
          strtimmed                         = 'X'
        recipient_obj                     = wa_recipient
    IMPORTING
       job_was_released                  = l_libero
    EXCEPTIONS
       cant_start_immediate              = 1
       invalid_startdate                 = 2
       jobname_missing                   = 3
       job_close_failed                  = 4
       job_nosteps                       = 5
       job_notex                         = 6
       lock_failed                       = 7
       OTHERS                            = 8.
    FORM get_distribucion_list USING    p_objnam       TYPE so_obj_nam
                               CHANGING p_wa_recipient LIKE swotobjid.
      DATA: it_tab LIKE STANDARD TABLE OF soxdl
                   INITIAL SIZE 0 WITH HEADER LINE.
      CHECK NOT p_objnam IS INITIAL.
      CALL FUNCTION 'SO_DLI_LIST_READ_XDL'
        EXPORTING
          dli_generic_name            = p_objnam
          public                      = 'X'
          subscript                   = 'X'
        TABLES
          dli_display_tab             = it_tab
        EXCEPTIONS
          communication_failure       = 1
          dl_list_no_entries          = 2
          owner_not_exist             = 3
          system_failure              = 4
          x_error                     = 5
          parameter_error             = 6
          OTHERS                      = 7
      IF sy-subrc = 0.
        READ TABLE it_tab INDEX 1.
        IF sy-subrc = 0.
          CALL FUNCTION 'OWN_LOGICAL_SYSTEM_GET'
            IMPORTING
              own_logical_system             = p_wa_recipient-logsys
            EXCEPTIONS
              own_logical_system_not_defined = 1
              OTHERS                         = 2.
          IF sy-subrc <> 0.
            MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          ENDIF.
          MOVE gc_objname TO p_wa_recipient-objtype.
          CONCATENATE it_tab-dlitp it_tab-dliyr it_tab-dlino
                      INTO p_wa_recipient-objkey.
        ENDIF.
      ELSE.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.

  • Error while sending email to distribution list

    Hello All,
    I am not able to send the email to Shared & Private distribution list.
    It is giving an error "Function <Send> not possible"
    I can send the email to users by specyfying their email id & recepient type as Internet address while sending mail from the Business Workplace. But we want to send it to users in shared/private distribution list.
    SCOT, SMTP are properly configured as per SAP Note 455140.
    Interestingly Routing Test in the SAPConnect shows no errors. Also the internal  traces are enabled, but it shows nothing for the outbound traces.
    Response starting with "220", in the telnet results (for both SAP server & Exchange server) confirms that the SCOT configuration is correct for Mail Host & Mail Port.
    We are on ECC6 on Oracle 10g & Windows.
    I have searched this forum but couldnot find relevant answer.
    If anybody has faced such problem, let me know how to resolve this.
    Regards,
    Vivdha

    Hi,
    Check in transaction SCOT. If your mail is in error status in SCOT, you can assure that there is no problem with your code. If your message has not reached till SCOT, then the problem will be with the code.
    If the mail is there in scot with error status tell the BASIS to configure it. I feel this could be the problem.
    Regards,
    Renjith Michael.

  • How do I send e-mail to a distribution list using LabWindows/CVI?

    I need to be able to send e-mail to a user-defined distribution list using LabWindows/CVI? Has anyone done this? Any ideas where I could look?

    I commented on something similar to this awhile back.  My issue was that I had the base version and didn't have the Internet classes.  So this external app worked like a charm
    It has a lot of command-line inputer options to use as well.
    http://forums.ni.com/t5/LabWindows-CVI/Need-Help-for-Sending-Email-with-LabWindows-8-5-or-9/m-p/1095...

  • Email to distribution list from SAP Internal Email

    I have a scenario where in I have to send email from sap internal email (T-code:-SBWP) to the distribution list.
    Can some one give me some idea on the same .
    When we go to T-code: - SBWP, for unread email we right click and fwd the email to distribution list, can we achieve the same functionality by a program so that we can automate the process.
    Thanks in Advance.
    Regards,
    Pawan.

    Hi,
    Yes ,one can write an ABAP code to send the mail to a distribution list.
    Please try and use the Function Module 'SO_NEW_DOCUMENT_SEND_API1' and you need to pass the import and export parameters to this FM which needs to be defined and populated before you use this FM.
    The first Exporting parameter is 'document_data' which will be of type 'sodocchgi1'.In order to populate this, you can use the structure of type 'sodocchgi1' and give the name, description, sensitivity and the language by referring to the data type mentioned above('sodocchgi1').
    The next is the document type and you can mention any one of them from 'RAW' to anything again refering to the document type.
    The next are the tables parameters and the first one is "object_content" which would be of type "solisti1" and you need to populate this one as well.This table would contain the contents of the mail.
    The next Tables parameters is "receivers" which would be of type 'somlreci1' and in order to populate this,you need to use the below like code:
    smtp_addr = any valid email id.
          gi_recievers-receiver = smtp_addr.
          gi_recievers-rec_type = 'U'.
          gi_recievers-com_type = 'INT'.
          APPEND gi_recievers.
    once this is done, an email will be sent to the recipient which can be monitored in the T-code SCOT and SOST.It will take sometime for the mail to be sent as there is a fixed timeline after which the R/3 system pushes the mails through it to the recipients.
    I guess, I have tried to answer your question.
    In case of any queries,please let me know.
    Regards,
    Puneet Jhari.

  • Sending email to multiple address using Utl_Smtp

    Hi,
    I want to send email to multiple address using the Utl_Smtp feature.
    When I am sending email to one email address in the To:Field it works fine.However, when I send
    to multiple address I am getting the below error.I am using a table(Email_test) to store all email id.
    Error report:
    ORA-29279: SMTP permanent error: 501 5.1.3 Invalid address
    ORA-06512: at "SYS.UTL_SMTP", line 20
    ORA-06512: at "SYS.UTL_SMTP", line 98
    ORA-06512: at "SYS.UTL_SMTP", line 240
    ORA-06512: at line 48
    29279. 00000 - "SMTP permanent error: %s"
    *Cause:    A SMTP permanent error occurred.
    *Action:   Correct the error and retry the SMTP operation.
    I am trying two options both ways I am getting error
    Option 1:
    Selecting two email id indivually in the select query as below
    select email into v_Recipient1 from Email_test where Key_name='U1';
    select email into v_Recipient2 from Email_test where Key_name='U2';
    v_Recipient := v_Recipient1||';'||v_Recipient2;
    Option 2:
    Is there a way to use option
    select email into v_Recipient1 from Email_test where Key_name='U4';
    ===========================================================
    Create table Script
    ===========================================================
    create table Email_test (Email varchar2(100),Key_name varchar2(10));
    insert into Email_test values ('[email protected]','U1');
    insert into Email_test values ('[email protected]','U2');
    insert into Email_test values ('[email protected]','U3')
    insert into Email_test values ('[email protected];[email protected];[email protected]','U4');
    select * from Email_test
    [email protected]                         U1
    [email protected]                         U2
    [email protected]                         U3
    [email protected];[email protected];[email protected]     U4
    select * from Email_test where Key_name in ('U1','U2','U3')
    [email protected]     U1
    [email protected]     U2
    [email protected]     U3
    select * from Email_test where Key_name='U4'
    [email protected];[email protected];[email protected]
    =======================================================
    PL/SQL Block
    ===========================================================
    declare
    v_From VARCHAR2(80) := '[email protected]';
    v_cc VARCHAR2(80);
    v_Recipient VARCHAR2(80) ;
    v_Recipient1 VARCHAR2(80) ;
    v_Recipient2 VARCHAR2(80) ;
    v_Subject VARCHAR2(80);
    v_Mail_Host VARCHAR2(50);
    v_Mail_Conn utl_smtp.Connection;
    crlf VARCHAR2(2) := chr(13)||chr(10);
    begin
    --Mail Host name
    select VALUE into v_Mail_Host from Server_info where server_name = 'SMTPServer';
    select email into v_Recipient1 from Email_test where Key_name='U1';
    select email into v_Recipient2 from Email_test where Key_name='U2';
    v_Recipient := v_Recipient1||';'||v_Recipient2;
    --for CC
    select email into v_cc from Email_test where Key_name='U3';
    v_Mail_Conn := utl_smtp.Open_Connection(v_Mail_Host, 25);
    utl_smtp.Helo(v_Mail_Conn, v_Mail_Host);
    utl_smtp.Mail(v_Mail_Conn, v_From);
    utl_smtp.Rcpt(v_Mail_Conn, v_Recipient);
    utl_smtp.Rcpt(v_Mail_Conn, v_cc); -- To CC recepient
    utl_smtp.Rcpt(v_Mail_Conn, v_BCC); To BCC recepient
    utl_smtp.Data(v_Mail_Conn,
    'Date: ' || to_char(sysdate, 'Dy, DD Mon YYYY hh24:mi:ss') || crlf ||
    'From: ' || v_From || crlf ||
    'Subject: '|| v_Subject || crlf ||
    'To: ' || v_Recipient || crlf ||
    'Cc: ' || v_cc || crlf ||
    'Content-Type: text/html;' ||crlf ||
    --'Hello this is a test email');
    crlf || to_char(sysdate, 'Dy, DD Mon YYYY hh24:mi:ss') || crlf );
    utl_smtp.Quit(v_mail_conn);
    end;
    Any suggestion how to approach this issue.
    Thank you

    Simple Mail Transfer Protocol RFC 5321 specifications.
          RCPT TO:<forward-path> [ SP <rcpt-parameters> ] <CRLF>
       The first or only argument to this command includes a forward-path
       (normally a mailbox and domain, always surrounded by "&gt;" and "&lt;"
       brackets) identifying one recipient.In other words, you can only define a SINGLE mailbox address at a time. Multiple addresses requires multiple repeats of this command verb, once per maibox.
    Do not confuse this and the To: tag line in the Mime header that contains a comma delimited list of recipients. That tag line can contain anything - it is not parsed, not checked, and not verified as matching the actual recipient mailboxes as specified via the RCPT TO verb.

  • Send email to muliple clients using Oracle Forms 6i through MS Outlook 2003

    I am working on oracle Forms 6i and Oracle 9i (9.2.0.1) database. My requirement is How to trigger email sending to multiple clients at a time while using Oracle Forms 6i through Microsoft Outlook 2003?
    To do this I have written the following code.
    PROCEDURE send_mail IS
    OutlookApp OLE2.OBJ_TYPE;
    NameSpace OLE2.OBJ_TYPE;
    MailItem OLE2.OBJ_TYPE;
    OLEPARAM OLE2.LIST_TYPE;
    Send OLE2.OBJ_TYPE;
    Attachments OLE2.OBJ_TYPE;
    Attachment_dummy OLE2.OBJ_TYPE;
    var1 varchar2(1000);
    Begin
    var1 := :mapiole.message;
    OutlookApp := OLE2.CREATE_OBJ('Outlook.Application');
    OLEPARAM := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(OLEPARAM,'MAPI');
    NameSpace := OLE2.INVOKE_OBJ(OutlookApp,'GetNameSpace',OLEPARAM) ;
    OLE2.DESTROY_ARGLIST(OLEPARAM);
    OLEPARAM := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(OLEPARAM,0);
    MailItem := OLE2.INVOKE_OBJ(OutlookApp,'CreateItem',OLEPARAM);
    OLE2.DESTROY_ARGLIST(OLEPARAM);
    OLE2.SET_PROPERTY(MailItem,'To',:to);
    OLE2.SET_PROPERTY(MailItem,'Subject',:subject);
    OLE2.SET_PROPERTY(MailItem,'Body', var1);
    --add an attachment
    if :mapiole.attach is not null then
    Attachments := OLE2.GET_OBJ_PROPERTY(MailItem,'Attachments');
    OLEPARAM := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(OLEPARAM,:attach);
    Attachment_dummy := OLE2.INVOKE_OBJ(Attachments,'add',OLEPARAM);
    OLE2.DESTROY_ARGLIST(OLEPARAM);
    end if;
    Send := OLE2.INVOKE_OBJ(MailItem,'Send');
    --destroy objects
    OLE2.RELEASE_OBJ(MailItem);
    OLE2.RELEASE_OBJ(NameSpace);
    OLE2.RELEASE_OBJ(OutlookApp);
    END;
    Create a block called MAPIOLE with the following canvas layout:
    To:      ============================
    Subject: ============================
    Message: ============================
    ============================
    Attachment: ============================           SEND      
    When I press the SEND button then
    Error comes "FRM-40735: WHEN-BUTTON-PRESSED trigger raised unhandled exception
    ORA-305500
    How can I do this?
    Please help me.
    Thanks.

    Do you have a requirement to use MS-Outlook from the Client or simple send email to a list of recipients? If the requirement is simply to send email to a list of recipients, I suggest you use UTL_SMTP from the database to send your email rather than OLE to Outlook on the Users computer. Search OTN or the forums for 'MAILDEMO' and you will find many examples on how to send email from the database.
    Hope this helps.
    Craig...

  • HT204150 Distribution list using Contacts

    How do I make a distribution list using Contacts?

    Click the the groups button in contacts
    Add and name a new group
    Drag contacts into the group
    Create an email and use the name of the group in the address field.

  • How to get administrations of distribution list using api?

    I want get all administrations of a distribution list using api, how to do that?
    anybody knows? Thank you very much!!

    there is a standard function in mdm wd component
    https://help.sap.com/saphelp_nwmdm71/helpdata/en/loio30bf76947bb64c48a2e835fda42c5183_30bf76947bb64c48a2e835fda42c5183/4…
    "Note The Compare to Original button on the Items Detail component opens a Compare component enabling a user to compare a checked out record with an original record (if the user has authorization for the checked out group).
    If the checked out record is a result of a merge action, then the Compare view displays all the original records prior to the merge. When a merge action is executed on a number of checked out records, the merged record is also checked out."

  • How to create Exchange dynamic distribution list using multivalue extension custom attribute

    I am trying to create a dynamic distribution list using an ExtensionCustomAttribute.  I am in hybrid mode with Exchange 2013.  The syntax I have is this: 
    New-DynamicDistributionGroup -Name "DG_NH" -RecipientFilter {(ExtensionCustomAttribute2 -eq 'NH')} 
    This works correctly on-prem.  But hosted always results in an empty list.  I can see in dirsync the attribute is in the hosted environment, but for whatever reason, the distribution group gets created but always come up null.
    If I create a group looking at the single valued attributes, such as CustomAttribute6 -eq 'Y', it works correctly on-prem and hosted.  
    If anyone has any suggestions I would appreciate it.

    I don't think I provided enough information about the problem.  Let me add some and see if it makes sense.
    I have an Exchange 2013 on-premise configured in hybrid mode with Office365.  For testing purposes, I have 2 users, Joe and Steve, one with the mailbox on-prem, and the other with the mailbox in the cloud.  Each of them has CustomAttribute6 = 'Y'
    and ExtensionCustomAttribute2 = 'NH'. Dirsync shows these users and these attributes are synced between on-prem and cloud.
    Using on-prem Exchange powershell, I run the following command:
    New-DynamicDistributionGroup -Name "DG_NH" -RecipientFilter {((RecipientType -eq UserMailBox) -or (RecipientType -eq MailUser) -and (CustomAttribute6 -eq 'Y')} 
    This correctly finds the 2 users when I query for them as follows:
    $DDG = Get-DynamicDistributionGroup DG_NH
    Get-Recipient -RecipientPreviewFilter $DDG.RecipientFilter | FT alias
    So I then delete this DG, and recreate it this time looking at the multi-value attribute ExtensionCustomAttribute2, as follows:
    New-DynamicDistributionGroup -Name "DG_NH" -RecipientFilter {((RecipientType -eq UserMailBox) -or (RecipientType -eq MailUser) -and (ExtensionCustomAttribute2 -eq 'NH')} 
    Replaying the query above, I can see this also works fine and finds my two users.
    Next I open a new powershell and connect to Office 365 and repeat the process there.
    New-DynamicDistributionGroup -Name "DG_NH" -RecipientFilter {((RecipientType -eq UserMailBox) -or (RecipientType -eq MailUser) -and (CustomAttribute6 -eq 'Y')} 
    This correctly finds the 2 users when I query for them.
    And then delete the group and recreate it using the multi-value attribute:
    New-DynamicDistributionGroup -Name "DG_NH" -RecipientFilter {((RecipientType -eq UserMailBox) -or (RecipientType -eq MailUser) -and (ExtensionCustomAttribute2 -eq 'NH')} 
    When I run the query this time it produces no result.  Every test I try results in an empty group if I am using a multi-valued attribute in the search criteria in the cloud.  If I use single valued attribute, it works fine.
    I really need to be able to get multi-valued DDG's working in the cloud.  If anyone has done this and has any suggestions, I would appreciate seeing what you did.  And if this is the wrong forum to port this, if you can point me to a more suitable
    forum I will report there.
    Thanks,
    Richard

  • How do I send email with pictures attached, using PSE 9 and Windows 7 ?

    How do I send email with pictures attached, using PSE 9 and Windows 7 ?

    Try email attachment workflow in Organizer. http://tv.adobe.com/watch/learn-photoshop-elements-9/sharing-your-images-via-email/
    Thanks
    Andaleeb

  • Send email to different domain using different address

    hi
    I want to set my exchange recipients have 2 email address.
    1=[email protected] 2=[email protected]
    1.how can I set this setting? (I know I can use something called policy but I don't know how can use that for exchange 2013; please tell me how can do this)
    2.how can set my exchange server to send email to different domain with different account? (after question 1; my recipients has 2 email address (***@domain.com,
    ***@domain.co) I want my recipients when send email to "company.com" using domain.com address and for other domains using domain.co)
    thanks

    1.  Add an accepted domain.  Add the e-mail address to your e-mail address policy.  Update the e-mail address policy.
    2.  http://www.ivasoft.biz/choosefrom2007.shtml  This has been the traditional answer for Exchange 2010 and earlier.  You might contact him to see if it works for Exchange 2013. 
    I don't know of a native way to do this except to create separate mailboxes for each address.
    Ed Crowley MVP "There are seldom good technological solutions to behavioral problems."

Maybe you are looking for