An automatic email notification is sent to the opportunity owner whenever the opportunity falls within 21 days of the opportunity close date.
The email notification is triggered using a Salesforce workflow rule and email alert, and contains a message with the Salesforce record information that we specified using an email template, as shown in the following screenshot:
If the opportunity close date is created less than 21 days in the future, the email alert will be sent immediately.