|
On the AS/400, there is no "email name" attribute of a user profile that would give you the email address of a particular user. If you are using the native AS/400 SMTP server, the SMTP table will contain the email address for the user profile. The SMTP table is the file QUSRSYS/QATMSMTPA. This file uses the directory entries to link to the user profile. The directory entry file is QUSRSYS/QAOKL02A. In order to get the email address associated with the user profile, you need to look up the entry in the QAOKL02A file, then look up then entry in the QATMSMTPA file. If you are using a different SMTP server (like the James server or the Communigate product) the location of the email addresses will probably be different. You can then easily write an RPG, Java, or COBOL program to get the email address for the signed in user. A spin-off in this concept is to create a separate file with user profile names and the associated email address. You could populate this file using whatever file set (if the native SMTP server is used or another SMTP server) on a nightly process and use the newly created file to search for an email address associated with a user name. In short, there is no attribute of a user profile that contains an email address. You can write a program to retrieve this information as needed. A side note: during OS upgrades, the layout of these system files may change. If you base any programs over these system files, you may need to recompile them after an OS upgrade. Mike ----- Original Message ----- From: "David Gibbs" <dgibbs@mks.com> Newsgroups: gmane.comp.lang.as400.java To: <java400-l@midrange.com> Sent: Thursday, July 25, 2002 9:37 AM Subject: Re: E-mail addresses > "Clapham, Paul" <pclapham@core-mark.com> wrote in message > news:DB4D0D451426D11190EA0060B03CCC790287BDED@VANCOUVER_NT... > > We have SMTP configured on our AS/400, and I would like to use JavaMail to > > send mail from it. Does anybody know how to find out (preferably from a > > Java program) the e-mail address of the current user? Some, but not many, > > of our users have their addresses in the SMTP system alias table. > > Is there a way to determine a users email address from outside of java? > > My gut says no, unless there's a way to determine what a users email address > via non-java means... in which case a native call would be required. > > david > > > -- > David Gibbs > Sr. Software Engineer / R&D / MKS Inc., www.mks.com > Lombard, IL, USA; tel: 630-495-2108; fax: 630-495-3591 > Build Better Software > > > > > _______________________________________________ > This is the Java Programming on and around the iSeries / AS400 (JAVA400-L) mailing list > To post a message email: JAVA400-L@midrange.com > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/cgi-bin/listinfo/java400-l > or email: JAVA400-L-request@midrange.com > Before posting, please take a moment to review the archives > at http://archive.midrange.com/java400-l. > >
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.