Use these mail settings to notify your customers and employees.
Three different mail services can be used to send email notifications to your customers and employees:
- PHP Mail (not recommended) – This option is selected by default for users that do not want to configure other mail services.
- WP Mail – This option uses the WP mail WordPress function for sending emails, and it is best to use it if you use some third-party plugin for sending emails.
- SMTP (Simple Mail Transfer Protocol) – In this article, we show how to configure the SMTP mail service for Gmail, but you can set it up for any other outgoing service that supports SMTP for a mail client. When you select this option, four inputs will appear – you need to populate them to configure SMTP properly. A Google SMTP example:
- SMTP Host – smtp.gmail.com
- SMTP Port – 587
- SMTP Secure – TLS
- SMTP Username – Your Gmail address
- SMTP Password – Your App password (details about setting up an app password can be found in the yellow notice section below)
The most commonly used SMTP Ports are 465 and 587. Port 465 uses “SSL” as SMTP Secure, while port 587 uses “TLS” as SMTP Secure. Make sure to check what the correct SMTP settings are for your mailing provider.
- Mailgun – Powerful APIs that enable you to send, receive, and track emails effortlessly.
To set up Mailgun, you need to populate the Mailgun API Key and Mailgun Domain input fields that appear when selecting Mailgun as your mail service.
- Access the domains section in your Mailgun account and copy the domain name (for example mg.yourwebsite.com) and paste it into Amelia, in the “Mailgun Domain” section;
- Access the API Keys section in your Mailgun account and copy the Private API Key. Paste it into Amelia, in the “Mailgun API Key” section;
This option’s value will be used as the sender name string in all email notifications that will be sent to your customers and employees.
This option’s value will be used as the sender’s email address in all email notifications that will be sent to your customers and employees.
Notify the customer(s) by default
This setting allows you to choose whether the “Notify the customer(s)” checkbox in the appointment modal will be enabled or disabled by default. If you disable this option, you will still be able to notify the customers by checking the “Notify the customer(s)” checkbox in the edit appointment modal in the admin area.
Successful Cancellation Redirect URL
This is where you enter the URL your customers will be redirected to if they successfully cancel the appointment by clicking the cancel URL in the email notification.
Unsuccessful Cancellation Redirect URL
This is where you enter the URL your customers will be redirected to if they unsuccessfully cancel the appointment by clicking the cancel URL in the email notification.
Send all notifications to additional addresses
This option allows you to set multiple additional addresses that will receive all notifications that you have enabled on the Notifications page. If, for example, you want the admin and/or manager to receive all emails about appointments, just write their email addresses here and all email notifications that will be sent to employees and customers will be sent to these email addresses as well. Once you fill in the first address press enter and the first address will be saved so you can add then the second one press enter, etc.
Send all SMS messages to additional numbers
This option allows you to set multiple additional phone numbers that will receive all SMS notifications that you have enabled on the Notifications page. Once you fill in the first number press enter and it will be saved so you can add then the second one press enter, etc. Please note that you need to add the whole phone number, with the country code, in order for it to be saved.
Scheduled Notifications (cron)
cron is a Linux utility that schedules a command or a script on your server to run automatically at a specified time and date. A cron job is a scheduled task itself. Cron jobs can be very useful to automate repetitive tasks like sending scheduled notifications in Amelia.
Depending on the server, there are different configurations for it, which you can contact your hosting provider about, or you can check out one of the solutions for it on this link.
Also, you can try this:
*/15 * * * * wget -q -O – “https://www.yourwebsite.com/wp-admin/admin-ajax.php?action=wpamelia_api&call=/notifications/scheduled/send”
*/15 * * * * /usr/local/bin/php ~/public_html/wp-cron.php –action=’wpamelia_api’ –call=’/notifications/scheduled/send’
GET ‘https://yourdomain.com/wp-admin/admin-ajax.php?action=wpamelia_api&call=/notifications/scheduled/send’ > /dev/null
WP Crontrol plugin is the best option if you’re not familiar with cron jobs. If you decide to use WP Crontrol, please follow the instructions below.
You copy only the URL from below a scheduled notification:
Then, in Crontrol go to “Cron Schedules”, and scroll all the way down. Add a 15 minute interval:
Then go to “Add PHP Cron Event” and add the URL you’ve copied like this:
Below it add the name and set it to run a few minutes in the future, using the provided time format. So, if you’re adding the cron event at 12:45, set it to run at 12:50; and then select the schedule you previously selected:
Click on Add Event, and that’s it.
The cron runs every 15 minutes and checks if there’s an email to be sent. So, in Amelia Notifications, your scheduled notifications are set to run every day at a certain time. If you set that time to be 15:00 (for example), the emails will be sent when the cron runs after that time.
For example, there’s an appointment booked for tomorrow, and it’s currently 14:44 – the cron runs, but since it’s not yet 15:00, it doesn’t send anything. It runs again after 15 minutes, so at 14:59, but there are still no emails flagged by Amelia, so it doesn’t send anything. Then it runs again at 15:14 and it sees there’s an email that should’ve been sent at 15:00, so it sends the email. It will only send emails when Amelia sees an appointment scheduled for the next day.