0 votes

Hello,

A new question : when I create a new contact in Adaxes, I'd like the email address automatically created.
How can I do this ?

Thanks for your response.
Yoann

by (180 points)

1 Answer

0 votes
by (216k points)

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: image.png

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:

  1. Create a new Business Rule.
  2. On the 2nd step of the Business Rule creation wizard, select Contact and After Creating a Contact.
  3. On the 3rd step of the wizard, add the Run a program or PowerShell script action and paste the script.
0

Thanks a lot

I just had to adapt the script for exchange 2010 :

$mailAlias = "%firstname%%lastname%"
$domainDN = "DC=mydomain,DC=com" #TODO: modify me
$domainCN = "CN=mydomain" #TODO: modify me
$adminGroupDN = "CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,$domainCN,CN=Microsoft Exchange,CN=Services,CN=Configuration,$domainDN"
try
{
    $Context.TargetObject.MailEnable($mailAlias, "%mail%", "SMTP", "Adaxes://$adminGroupDN")
}
catch
{
   $Context.LogMessage($_.Exception.Message, "Error")
}
0

Starting from Adaxes 2013.1, you can automatically establish e-mail addresses for Contacs. For this purpose, use the Establish e-mail address in Exchange action. This action is also available for Users and Distribution Groups.

0

Thanks !

Related questions

0 votes
1 answer

The default pattern format we need should be :First letter of User firstname concatinated to user lastname and pd.sandiego.gov as in jdoe@pd.sandiego.gov

asked Jan 23 by hhsmith (100 points)
0 votes
1 answer

Hi all I need to modify the template $remoteRoutingAddressTemplate with the default exchange option automatically update email addresses disable. How i make it?

asked Nov 28, 2022 by Simone.Vailati (430 points)
0 votes
1 answer

I need to be able to create a csv and email it once a week of accounts that have a date in %hiredate% that starts in the next 7 days. I need to include the full ... dept, and %hiredate% feilds in the CSV. Any help you can provide would be great. Thank you,

asked Sep 9, 2020 by hgletifer (1.3k points)
0 votes
1 answer

Hello! I am running a powershell script that takes data and uses that to automatically create New-AdmUser. I want to have that new user send to the approval queue in adaxes, ... user is created, it gets sent to the approval queue. Any help would be amazing!!!

asked Jul 28, 2021 by Monkeyface46 (50 points)
0 votes
1 answer

It is possible to automatically create the logon name based on eg %firstname% and %lastname%, however I want to achieve the following: logon name = first letter FirstName, first ... account where that field is used for. How to achieve this? With regards, Remco

asked Nov 21, 2013 by RTiel (780 points)
3,541 questions
3,232 answers
8,225 comments
547,802 users