It can be done but it's not something that's part of Solaris.
Basically you'd have to check /etc/shadow for the password change date and the number of days for password changes. Get today's date, subtract seven days from it (for example), add the password change number of days to the password change date. If that number is greater than today - 7 days, send them an e-mail.
We added the users e-mail address to the GECOS field (:name,e-mail
and we just send them a message each day. If it's expired, we send them a "your account has expired, your scripts aren't running, please contact the help desk" message.
Carl