0 votes

I am using a Send An Email on create mailbox function. Sometimes it works and sometimes not. The issue seems to be that Adaxes fires the rule too quickly before the Exchange mailbox has been fully created.

How do I put a pause into a rule? Like 30 seconds?

by (280 points)

1 Answer

0 votes
by (216k points)

Hello,

Are you using Exchnage 2003?

We suggest that you send your email in a PowerShell script. This script allows you to 'pause' the operation:

  1. Add the Run a program or PowerShell script action to your Business Rule.

  2. In the Add Action dialog, enable the Execute asynchronously option.

  3. Type the following PowerShell script:

     Start-Sleep -s 30 # waiting 30 seconds
     $toAddress = "%mail%"
     $subject = "Welcome, %username%" # TODO: modify me
     $bodyText = "Dear %name%, ..." # TODO: modify me
     $bodyHtml = "Dear <b>%name%</b>, ..." # TODO: modify me
     $Context.SendMail($toAddress, $subject, $bodyText, $bodyHtml)
0

We use Exchange 2010

0

Did the script correct the issue?

Related questions

0 votes
1 answer

We have a 3rd party vendor that we are able to add users based on AD security groups. What I need to do is set a parameter for the number of available licenses and whenever ... the group is 495 I would like an email to trigger telling me to add more licenses.

asked Oct 12, 2022 by A_Pastor (70 points)
0 votes
1 answer

Hello, I'm trying to setup a business rule that will send an email to the user when they are added to a group. Under the User Object I don't have an option to Launch ... to get the new group member's email address so I can send a notification to it? Thanks!

asked Dec 1, 2015 by drew.tittle (810 points)
0 votes
1 answer

Using this built in function: There is no option to change the domain on the user account, however this is not the domain we use for UPN. However after creating a user, you can change it but trying to avoid going back into the object.

asked Apr 14, 2023 by mightycabal (1.0k points)
0 votes
0 answers

Hello, I want to automate the creation of a contact based on an existing AD Users. For example, the code in my custom command contains something like: new-mailcontact - ... a parameter after he run the Custom Command from the Web interface? Thanks in advance.

asked Apr 20, 2016 by tentaal (1.1k points)
0 votes
1 answer

I am trying to create a business rule to send an email to the manager of the group when a member is added or removed from a rule-based group. I have created the business rule and it works for other groups but not for a rule-based group. Can this be done?

asked Jul 19, 2021 by mark.it.admin (2.3k points)
3,346 questions
3,047 answers
7,782 comments
544,982 users