Accessing the Distribution list

Hi All,
I am exploring the ways to access the Distribution lists from the email server programatically.
Following are few of the queries:
1. How to send / fetch mails for the particular distribution list from email server.
2. Is it possible to create the distribution list within code. If yes, then do all the mail server provide this kind of functionality.
3. As the Distribution list is a group of email id's and not the one specified user. How does the authentication happens for this.
Any pointer to the relevant documenation.
Regards

hi,
try this.
package Process;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileWriter;
import java.io.InputStreamReader;
import java.util.*;
public class VBSUtils {
private VBSUtils() {  }
public static List<String> listRunningProcesses() {
List<String> processList = new ArrayList<String>();
try {
File file = File.createTempFile("realhowto",".vbs");
file.deleteOnExit();
FileWriter fw = new java.io.FileWriter(file);
String vbs = "Set WshShell = WScript.CreateObject(\"WScript.Shell\")\n"
+ "Set locator = CreateObject(\"WbemScripting.SWbemLocator\")\n"
+ "Set service = locator.ConnectServer()\n"
+ "Set processes = service.ExecQuery _\n"
+ " (\"select name from Win32_Process\")\n"
+ "For Each process in processes\n"
+ "wscript.echo process.Name \n"
+ "Next\n"
+ "Set WSHShell = Nothing\n";
fw.write(vbs);
fw.close();
Process p = Runtime.getRuntime().exec("cscript //NoLogo " + file.getPath());
BufferedReader input =
new BufferedReader
(new InputStreamReader(p.getInputStream()));
String line;
while ((line = input.readLine()) != null) {
processList.add(line);
input.close();
catch(Exception e){
e.printStackTrace();
return processList;
public static void main(String[] args){
List<String> processes = VBSUtils.listRunningProcesses();
String result = "";
Iterator<String> it = processes.iterator();
int i = 0;
while (it.hasNext()) {
result += it.next() +",";
i++;
if (i==10) {
result += "\n";
i = 0;
msgBox("Running processes : " + result);
public static void msgBox(String msg) {
javax.swing.JOptionPane.showConfirmDialog((java.awt.Component)
null, msg, "VBSUtils", javax.swing.JOptionPane.DEFAULT_OPTION);
}

Similar Messages

  • "changes to the distribution list membership cannot be saved. you do not have sufficient permission to perform this operation on this object"

    Running Exchange 2010/latest updates on Windows 2008 R2 servers.
    When I create a new DL that I want someone to manage, they received the following message when trying to add/remove from the DL:
    "changes to the distribution list membership cannot be saved.  you do not have sufficient permission to perform this operation on this object"
    I have followed everything in "http://msexchangeteam.com/archive/2009/11/18/453251.aspx" with no luck
    Any suggestions?

    Piggybacking off of the discussion above, with our deployment of Exchange 2007, we created a set of web-based tools that allowed people to create Exchange Resources including distribution lists.  To allow multiple people to manage the lists for a given
    department, we programmatically created a group, which is populated with one or more users from the "resource department".  We then set the following AD permissions to allow members of the group to manage membership of departmental distribution lists:
    Add-ADPermission -User DepartmentalGroup -AccessRights ReadProperty, WriteProperty -Properties 'Member' -DomainController dc.contoso.com
    Fast forward to Exchange 2010 and the landscape has changed with Exchange 2010's implementation of Role Based Access Control and I'm struggling to come up with a way to programmatically allow a group of users to manage distribution list membership for a
    subset of distribution lists - note that we have approximately 75 departments, with each having its own set of coordinators who should be able to manage distribution lists for their department but not lists created by other departments.  The specific
    error we receive in Outlook when attempting to modify group membership is the same as the title of this thread - "Changes to the distribution list membership cannot be saved.  You do not have sufficient permission to perform this operation on this object". 
    I implemented the settings referred to at
    http://sysadmin-talk.org/2010/06/omg-allowing-end-users-to-manage-distribution-group-membership-in-exchange-2010-2/ which details the process of creating a new management role and revoking the role's ability to create new distribution lists and remove distribution
    lists (which we want because we want those actions to be performed using our web tools). 
    All that to say that the ultimate problem we have is that the above relies on the "ManagedBy" field of a distribution list (viewable by Get-DistributionList Listname | fl *ManagedBy*) to determine group ownership.  When "ManagedBy" is set to a user,
    the user CAN edit a distribution list's membership from Outlook and OWA.  When "ManagedBy" is set to a group, members of the group are UNABLE to edit the membership of the distribution list via Outlook or Outlook Web Access/ECP.   Furthermore,
    Set-DistributionGroup does not allow you to specify a list of users to assign to the ManagedBy field.  However, if "ManagedBy" was set to a specific user and that user logs in to the Exchange Control Panel and adds additional "owners" of the distribution
    list, which I can then see from EMS - both the original owner and any additional owners added can in turn modify group membership for the list using Outlook or Outlook Web Access/ECP.
    My questions:
    1) Is it "expected" behavior that while I can assign a group to the "ManagedBy" property of distribution list, members of that group are still unable to edit the group membership?  ...or is there a fix for the behavior I'm seeing?
    2) Can multiple values be assigned to the "ManagedBy" property when using Set-DistributionList - ex: Set-DistributionList DLName -ManagedBy:user1,user2
    3) Any other suggestions?
    Thanks,
    -Lance

  • How to access the result list in teststand after execution using labwindows​/cvi

    I am developing a user interface in labwindows/cvi that runs multiple teststand sequence files and would like to combine their reports (generated in teststand) into a single file at the end of a UUT. What is the best way to do this? At the moment, I'm trying to access the result list local variable after the execution has ended using API calls from labwindows/cvi and an end-of-execution callback event but those run-time variables do not exist anymore. How do I get a hold of the result list array at the end of an execution? I would like to grab this variable and pass it along from sequence to sequence using labwindows/cvi and not teststand itself. Is this possible? Any help would be great.
    Thanks in advance,
    Luis

    Hey Luis,
    Check out the response to this thread at the NI TestStand board here!

  • Need to send an attachment with the mail to the distribution list

    Hi all,
    How do I send an <b>attachment</b> with the e-mail to a distribution list?
    I am using the FMs <b>SO_DLI_EXPAND</b> and <b>SO_OBJECT_SEND</b> to expand the distribution list and send mail to the distribution list respectively.I am getting the contents of the file in the email that is being sent. The file is being extracted from UNIX.
    However, the contents of the file has to go as an attachment.
    Please assist.
    Thanks and regards,
    Anishur

    Hello,
    You can do it like this...using SapScript:
    REPORT YMAIL.
    DATA: ITCPO LIKE ITCPO,
    TAB_LINES LIKE SY-TABIX.
    Variables for EMAIL functionality
    DATA: MAILDATA LIKE SODOCCHGI1.
    DATA: MAILPACK LIKE SOPCKLSTI1 OCCURS 2 WITH HEADER LINE.
    DATA: MAILHEAD LIKE SOLISTI1 OCCURS 1 WITH HEADER LINE.
    DATA: MAILBIN LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
    DATA: MAILTXT LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
    DATA: MAILREC LIKE SOMLREC90 OCCURS 0 WITH HEADER LINE.
    DATA: SOLISTI1 LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE.
    PERFORM SEND_FORM_VIA_EMAIL.
    FORM SEND_FORM_VIA_EMAIL *
    FORM SEND_FORM_VIA_EMAIL.
    CLEAR: MAILDATA, MAILTXT, MAILBIN, MAILPACK, MAILHEAD, MAILREC.
    REFRESH: MAILTXT, MAILBIN, MAILPACK, MAILHEAD, MAILREC.
    Creation of the document to be sent File Name
    MAILDATA-OBJ_NAME = 'TEST'.
    Mail Subject
    MAILDATA-OBJ_DESCR = 'Subject'.
    Mail Contents
    MAILTXT-LINE = 'Here is your file, would you check it?'.
    APPEND MAILTXT.
    Prepare Packing List
    PERFORM PREPARE_PACKING_LIST.
    BREAK gpulido.
    Set recipient - email address here!!!
    <b>*MAILREC-RECEIVER = '[email protected]'.
    MAILREC-RECEIVER = '[email protected]'.
    MAILREC-REC_TYPE = 'U'.</b>
    APPEND MAILREC.
    Set recipient - email address here!!!
    *MAILREC-RECEIVER = 'BGIRALDO'.
    *MAILREC-REC_TYPE = 'B'.
    *APPEND MAILREC.
    Sending the document
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    DOCUMENT_DATA = MAILDATA
    PUT_IN_OUTBOX = 'X'
    TABLES
    PACKING_LIST = MAILPACK
    OBJECT_HEADER = MAILHEAD
    CONTENTS_BIN = MAILBIN
    CONTENTS_TXT = MAILTXT
    RECEIVERS = MAILREC
    EXCEPTIONS
    TOO_MANY_RECEIVERS = 1
    DOCUMENT_NOT_SENT = 2
    OPERATION_NO_AUTHORIZATION = 4
    OTHERS = 99.
    submit rsconn01 with mode = 'INT' and return.
    CASE SY-SUBRC.
    WHEN 0.
    WRITE: / 'Result of the send process:'.
    LOOP AT MAILREC.
    WRITE: / mailrec-RECEIVER(48), ':'.
    IF mailrec-RETRN_CODE = 0.
    WRITE 'sent successfully'.
    ELSE.
    WRITE 'not sent'.
    ENDIF.
    ENDLOOP.
    WHEN 1.
    WRITE: / 'no authorization to send to the specified number of'
    WHEN 2.
    WRITE: / 'document could not be sent to any of the recipients!'.
    WHEN 4.
    WRITE: / 'no authorization to send !'.
    WHEN OTHERS.
    WRITE: / 'error occurred during sending !'.
    ENDCASE.
    ENDFORM.
    Form PREPARE_PACKING_LIST
    FORM PREPARE_PACKING_LIST.
    CLEAR: MAILPACK, MAILBIN, MAILHEAD.
    REFRESH: MAILPACK, MAILBIN, MAILHEAD.
    DESCRIBE TABLE MAILTXT LINES TAB_LINES.
    READ TABLE MAILTXT INDEX TAB_LINES.
    MAILDATA-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + STRLEN( MAILTXT ).
    Creation of the entry for the compressed document
    CLEAR MAILPACK-TRANSF_BIN.
    MAILPACK-HEAD_START = 1.
    MAILPACK-HEAD_NUM = 0.
    MAILPACK-BODY_START = 1.
    MAILPACK-BODY_NUM = TAB_LINES.
    MAILPACK-DOC_TYPE = 'RAW'.
    APPEND MAILPACK.
    Creation of the document attachment
    This form gets the OTF code from the SAPscript form.
    If you already have your OTF code, I believe that you may
    be able to skip this form. just do the following code, looping thru
    your SOLISTI1 and updating MAILBIN.
    PERFORM GET_OTF_CODE.
    LOOP AT SOLISTI1.
    MOVE-CORRESPONDING SOLISTI1 TO MAILBIN.
    APPEND MAILBIN.
    ENDLOOP.
    DESCRIBE TABLE MAILBIN LINES TAB_LINES.
    MAILHEAD = 'TEST.OTF'.
    APPEND MAILHEAD.
    Creation of the entry for the compressed attachment
    MAILPACK-TRANSF_BIN = 'X'.
    MAILPACK-HEAD_START = 1.
    MAILPACK-HEAD_NUM = 1.
    MAILPACK-BODY_START = 1.
    MAILPACK-BODY_NUM = TAB_LINES.
    MAILPACK-DOC_TYPE = 'OTF'.
    MAILPACK-OBJ_NAME = 'TEST'.
    MAILPACK-OBJ_DESCR = 'Subject'.
    MAILPACK-DOC_SIZE = TAB_LINES * 255.
    APPEND MAILPACK.
    ENDFORM.
    Form GET_OTF_CODE
    FORM GET_OTF_CODE.
    DATA: BEGIN OF OTF OCCURS 0.
    INCLUDE STRUCTURE ITCOO .
    DATA: END OF OTF.
    DATA: ITCPO LIKE ITCPO.
    DATA: ITCPP LIKE ITCPP.
    CLEAR ITCPO.
    ITCPO-TDGETOTF = 'X'.
    Start writing OTF code
    CALL FUNCTION 'OPEN_FORM'
    EXPORTING
    FORM = 'YSEND_MAIL'
    LANGUAGE = SY-LANGU
    OPTIONS = ITCPO
    DIALOG = ' '
    EXCEPTIONS
    OTHERS = 1.
    CALL FUNCTION 'START_FORM'
    EXCEPTIONS
    ERROR_MESSAGE = 01
    OTHERS = 02.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
    WINDOW = 'MAIN'
    EXCEPTIONS
    ERROR_MESSAGE = 01
    OTHERS = 02.
    Close up Form and get OTF code
    CALL FUNCTION 'END_FORM'
    EXCEPTIONS
    ERROR_MESSAGE = 01
    OTHERS = 02.
    MOVE-CORRESPONDING ITCPO TO ITCPP.
    CALL FUNCTION 'CLOSE_FORM'
    IMPORTING
    RESULT = ITCPP
    TABLES
    OTFDATA = OTF
    EXCEPTIONS
    OTHERS = 1.
    Move OTF code to structure SOLI form email
    CLEAR SOLISTI1. REFRESH SOLISTI1.
    LOOP AT OTF.
    SOLISTI1-LINE = OTF.
    APPEND SOLISTI1.
    ENDLOOP.
    Reward points if helpful.
    Thanks
    Message was edited by:
            Pattan Naveen

  • How do you filter entities by properties in the Distribution List?

    Hello, experts:
    Can you tell me how I can filter entities by property in the Distribution List? For example, I only want to distribute the input schedule to the entities that have a "PROJECTLVL" property of "Y".
    Thank you.
    Bei

    A lot of the collective consciousness:
    How to improve your experience with Apple Support Communities ( ASC )
    Easiest way to all User Tips on Using ASC may be to add " /content " to the URL then click the User Tips Category TAB
    *some User Tips have some of the same stuff but also some unique
    SITEMAP | Apple Support Communities has some gems as well

  • Receiving Group Text : How do i see who else is in the distribution list???

    Receiving Group Text : How do i see who else is in the distribution list???
    other phones seem to have this, how can i see this? 
    Post relates to: Pre p100eww (Sprint)

    Use his/her Apple ID for iMessage on your phone...you'll actually receive the messages in real time.

  • User request to explore the possibility of downloading the distribution lists into excel for maintenance in t-code SO23.

    Hi Experts,
    There is a requirement from user that  "To explore the possibility of downloading the distribution lists
    into excel for maintenance in t-code SO23 ".
    Kindly provide your valuable informations/assistance in this regard.
    Madhavan K

    This Applesctipt will add comma's to the file count:
    (Copy into Applescript Editor, and Save as File Format: App, then just click the App to run)
    set x to choose folder with prompt "Choose Folder to Count Files" default location alias (the path to pictures folder as text)
    set filecount to do shell script "find " & POSIX path of x & " ! -type d ! \\( -name \".*\" -or -name \"Icon*\" \\) | wc -l"
    display dialog "File Count: " & comma_delimit(trim(filecount))
    on trim(someText)
              repeat until someText does not start with " "
                        set someText to text 2 thru -1 of someText
              end repeat
              repeat until someText does not end with " "
                        set someText to text 1 thru -2 of someText
              end repeat
              return someText
    end trim
    on comma_delimit(this_number)
              set this_number to this_number as string
              if this_number contains "E" then set this_number to number_to_text(this_number)
              set the num_length to the length of this_number
              set the this_number to (the reverse of every character of this_number) as string
              set the new_num to ""
              repeat with i from 1 to the num_length
                        if i is the num_length or (i mod 3) is not 0 then
                                  set the new_num to (character i of this_number & the new_num) as string
                        else
                                  set the new_num to ("," & character i of this_number & the new_num) as string
                        end if
              end repeat
              return the new_num
    end comma_delimit

  • How to access the contact list before i had updated.

    how to access the contact list before i had updated IOS7.
    My contact list has gone now....

    I am not sure about the syncing problem, i just use my apple ID.....
    what should i do, if i didn't do the syncing step:(

  • No recipient specified - is the distribution list empty?

    Hi All,
    When I am trying to send a mail to the internet mail id using System->Short message....it throws a message like...
    "No recipient specified - is the distribution list empty?"
    Please help me...

    That's even stranger. I used that FM 5 minutes ago with this data, in se37, and I received the email.
    I_TITLE                                   TESTE                           
    I_SENDER                              <my work email>         
    I_RECIPIENT                           <my personal email>
    I_FLG_COMMIT                       X                               
    I_FLG_SEND_IMMEDIATELY   X                                                                               
    Tables                         Value
    I_TAB_LINES                        1 Entrada                     (TESTE written in row 1)
    See if you have your SMTP node of SAPConnect well configured.
    Regards.
    Valter Oliveira.

  • Did apple solve the distribution list issue on lion

    In Snow-Leo there was a very annoying problem on mail distribution-lists, if the people on the list had multiple email adresses.
    More information here:
    https://discussions.apple.com/thread/2398363?start=0&tstart=0
    Does anybody know, whether this is solved with lion?
    Regards
    Robert

    Open universal access in system preferences
    click seeing
    leave zoom off, but click options

  • HT2486 Cannot access Edit Distribution List

    I used to be able to access the Edit Distribution List but it is now grayed out. Does this have anything to do with using iCloud?
    Any ideas?

    Yes it does.  See this article.
    http://reviews.cnet.com/8301-13727_7-20126108-263/address-book-distribution-list -editor-disabled-by-icloud/?part=rss&tag=feed&subj=MacFixIt

  • In the upgrade to Yosemite, the distribution list feature in mail appears to have been eliminated.  Any suggestions?

    Prior to upgrading to Yosemite, mail allowed you to select all from a contact group and paste the e-mail address of the group to an e-mail send field.  This "distribution list" feature does not seem to work in this new system.  Any suggestions?

    You can see a detailed comparison between MobileMe and iCloud, plus general information and some links to Apple Help pages, here:
    http://rfwilmut.net/icloud
    Question 2 would be best asked as an individual question in the hope of attracting the attention of someone who is in the same situation and can give you a practical answer: question 3 would best be asked in the iPhone forum.

  • Is there anyplace for me to access the total list that data takes my GB?

    Does anyone have a list of what things, actions , or stuff uses my data?

        That's a great question! Data usage is considered protected content, and there is no way to access the specific websites and content that was accessed without a court order releasing the information.  However, you can log on to My Verizon and view the dates & times of usage, along with the amount of data used in each session. http://bit.ly/xB4iTc
    Thank you,
    MichelleH_VZW
    Follow us on Twitter @VZWSupport

  • How to stop sending spool list of a particular step in a batch job to the Distribution list

    Hi  All
    I have a Batch job  with three steps ( Three programs) which will be sending Spool list for all the 3 steps to the assigned distribution list
    My user requirement is he want only the spool list for the 3rd step only (Exclude 1st and 2nd)

    Hi,
    you can consult your Basis consultant and also check few settings in T.code-SPAD

  • Rule to pass the Distribution list created by the user.. or any sap method

    Hi Guys,
    After completion of material Creation, I need to notify the user(a distribution list is created by user and they have given it to me). I don't know how should i pass the name of my distribution list .  Please let me know any method or any rule for the same
    Thanks
    Mrunal

    Hello,
    By notify, do you mean emails? Are they being sent outside of SAP? In that case you may want to look at setting up a distribution list in the mail system (eg Outlook) and sending to it. Haven't tried it myself but I've heard it's possible.
    regards
    Rick Bakker
    Hanabi Technology

Maybe you are looking for