Hello,
(IDM 7.2 with MSSQL)
I try to create a job that sends all user their "IDM-PASSWORD" via email.
In the first step, I generate a random password for all user. This password should now be sent to each user so they can log in to IDM-UI.
This is my approach:
1. Step
Define the source
A Job with a to generic pass:
SOURCE:
SELECT DISTINCT mskey FROM idmv_vallink_basic_active WHERE mcidstore=1 AND ((mskey IN (SELECT mcmskey FROM idmv_vallink_basic_active WHERE mcattrname='MX_ENTRYTYPE' AND mcsearchvalue = 'MX_PERSON')))
Destination:
MSKEYVALUE = %MSKEYVALUE%
JOB CONSTANTS:
MAIL_SMTP_HOST = Host
MAIL_SMTP_PORT = Port
MAILATTRIBUTE = MX_MAIL_PRIMARY
MAILFROM = MAIL....com
NOTIFICATION = blabla
POSTTEXT = </FONT><br><br>
PRETEXT = <FONT SIZE=5> blabla
Script for mailing:
function blödesMailding(Par){
var userList = Par.get("MSKEYVALUE");
var user = new java.util.Vector();
user = uSplitString (userList, "|");
var i = 0;
var result;
var emailAddress = "";
var idStore = uGetIDStore();
var emailAttribute = "%$MAILATTRIBUTE%";
for (i=0; i < user.size(); i++) {
emailAddress = uIS_GetValue(user.get(i), idStore, emailAttribute);
result = UserFunc.uSendSMTPMessage("%$MAILFROM%", emailAddress, "%$NOTIFICATION% ", "%$PRETEXT% " + "%$POSTTEXT%", "%$MAIL_SMTP_HOST%", "%$MAIL_SMTP_PORT%", 1);
if (result.length > 0) {
UserFunc.uErrMsg(2, result + ":Mail to:" + emailAddress);
}
}
return "";
}
And here is the error message^^:
Warning Constant MAIL_SMTP_HOST was not defined in the repository (-1) Warning Constant MAIL_SMTP_PORT was not defined in the repository (-1) Warning Constant MAIL_ORIGINATOR was not defined in the repository (-1) Warning Constant MAIL_DEBUG was not defined in the repository (-1) Warning Constant MAIL_DEBUG_RECIPIENTS was not defined in the repository (-1) }
I set all of these constats in the GLOBAL CONTANTS form ID store!
and here he also complains:
Warning Could not send SMTP message to !ERROR:Entry does not exist using SMTP host mail.mymhp.net java.net.ConnectException: Connection refused: connect Warning Could not send SMTP message to !ERROR:Entry does not exist using SMTP host mail.mymhp.net java.net.ConnectException: Connection refused: connect Warning Could not send SMTP message to !ERROR:Entry does not exist using SMTP host mail.mymhp.net java.net.ConnectException: Connection refused: connect Warning Could not send SMTP message to !ERROR:Entry does not exist using SMTP host mail.mymhp.net java.net.ConnectException: Connection refused: connect Warning Could not send SMTP message to !ERROR:Entry does not exist using SMTP host mail.mymhp.net java.net.ConnectException: Connection refused: connect Warning Could not send SMTP message to !ERROR:Entry does not exist using SMTP host mail.mymhp.net java.net.ConnectException: Connection refused: connect ...
Maybe I made a mistake, or my solution doesn't work at all.
I would be very glad if someone had an idea, or a better solution for this problem.