''====
UNCOMMENT IF NOT USING A SCHEDULED TASK (WAIT FOR SPECIFIC TIME) ====
''SleepUntil 08:00
''====
SETTINGS ====
Set ExpWarnDays=7
Set TestMode=true
''==== FIND
NON-EXPIRED USERS WITH PENDING PASSWORD CHANGE ====
ForEach User in [AllUsers]
If UserEnabled
[Var User] Then
If UserMustChangePasswordSoon
[Var ExpWarnDays],[Var User] Then
Set EMail=[UserEMailAddress [Var User]]
If Not VarIsEmpty EMail Then SendNotificationMail [Var Email]
End If
End If
End ForEach
''==== UNCOMMENT
IF NOT USING A SCHEDULED TASK (RESTART) ====
''Restart
''==== EXEC
EMAIL SEND ====
Command SendNotificationMail(Recipient)
''==== SET SMTP STATIC INFORMATION ====
Set SmtpPort=25
Set SmtpServer=mail.acme.com
Set SmtpSender=no-reply@acme.com
Set SmtpUsername=no-reply@acme.com
Set SmtpPassword=[EncryptPassword MyPass] ''Preferably
encrypt the password in the editor instead
Set SmtpSenderName="Acme
Corp"
Set EMailHeader="Password
expiry notification"
''==== SET MAIL BODY ====
Set Body = "Dear [UserFullName [Var User]].[Return][Return]_
Your logon password will expire
on [UserPasswordExpiryDate [Var User]].[Return][Return]_
If your
are connecting through VPN, you may encounter problems connecting to the
network, _
If you
have not logged on to the network and changed your password at this date at the
lastest.[Return][Return]_
You will receive a daily
notification until you have changed your password."
''==== SEND EMAIL OR SHOW MAILBODY IN TEST MODE ====
If [Var TestMode]=True Then
ShowMessage [Var Body]
Else
SendMailPlain [Var SmtpServer],[Var SmtpPort],[Var SmtpSender],[Var SmtpSenderName],[Param Recipient],_
[Var EMailHeader],[Var Body],[Var SmtpUserName],[Var SmtpPassword]
End If
End Command