on 10-31-2014 11:05 AM
I am using powerbuilder emailsmtp program to send the email from powerbuilder application 11.2, But each machine have separate user name and password for each user email. That user name password is same as system login username and login password. Is there anyway to get this username, password in session variable to send the mail automatically from the program without manually giving loginname and password while sending the mail.
Please advise
Kind Regards
Pol
Hi Polachan;
The user & login name is easy to get via the GetUserName or GetUserNameEx MS-Windows SDK calls.
FUNCTION Boolean GetUserName (ref string lpBuffer, ref Long nSize ) LIBRARY "ADVAPI32.DLL" ALIAS FOR "GetUserNameW"
The password is not obtainable though (AFAIK). However, you could circumvent that by using Active Directory (trusted) access. You would have to use the ADSI MS-Windows API calls for that.
FYI: Active Directory Service Interfaces (Windows)
HTH
Regards ... Chris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can find samples of using LDAP to work with Active Directory on the old Sybase CodeXchange site: http://www.sybase.com/detail?id=1058501&id=1058501
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.