blister911
MIS
Hello,
I'm creating a script that will validate new email addresses, based on our email address policy, to make sure they are not already in use. However, I'm stuck trying to convert the email address template strings into valid email addresses so they can be verified as useable?
Here's an example: I have a new user named John Doe (samaccountname: jdoe12345). According to our email address policy John will get the email addresses of %g.%s@mydomain.com (John.Doe@mydomain.com) and %m@mydomain.com (jdoe12345@mydomain.com). I need to verify those addresses are not used before I create the account.
I hate to hard code anything if I don't have to, but would it be easiest to just hard code a variable conversion? Something like: search for %g in the address string and then replace it with the first name.
Thanks.
Light travels faster than sound. That's why some people appear bright until you hear them speak.
I'm creating a script that will validate new email addresses, based on our email address policy, to make sure they are not already in use. However, I'm stuck trying to convert the email address template strings into valid email addresses so they can be verified as useable?
Here's an example: I have a new user named John Doe (samaccountname: jdoe12345). According to our email address policy John will get the email addresses of %g.%s@mydomain.com (John.Doe@mydomain.com) and %m@mydomain.com (jdoe12345@mydomain.com). I need to verify those addresses are not used before I create the account.
I hate to hard code anything if I don't have to, but would it be easiest to just hard code a variable conversion? Something like: search for %g in the address string and then replace it with the first name.
Thanks.
Light travels faster than sound. That's why some people appear bright until you hear them speak.