Update 2015
Starting with Adaxes 2015 you can automatically establish email addresses after creating contacts using the Establish email address in Exchange action. The business rule will look like the following:
Original
Hello Yoann,
Currently, you cannot automatically establish an email address for a Contact using a Business Rule action. This feature is planned for Adaxes 2012.2.
Currently, you can make it with a PowerShell Script. The script for Exchange 2007 and Exchange 2010 will be as follows:
$mailAlias = "%firstname%%lastname%"
$domainDN = "DC=mydomain,DC=com" #TODO: modify me
$adminGroupDN = "CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=First Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,$domainDN"
try
{
$Context.TargetObject.MailEnable($mailAlias, "%mail%", "SMTP", "Adaxes://$adminGroupDN")
}
catch
{
$Context.LogMessage($_.Exception.Message, "Error")
}
Replace mydomain and com in $domainDN with the appropriate values.
To launch this script automatically on contact creation, create a Business Rule that will be triggered after creating a Contact:
- Create a new Business Rule.
- On the 2nd step of the Business Rule creation wizard, select Contact and After Creating a Contact.
- On the 3rd step of the wizard, add the Run a program or PowerShell script action and paste the script.