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.
- IK Mail – This option uses IK mail Ideakit 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 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 in to configure SMTP properly. A Google SMTP example:
- SMTP Host – smtp.gmail.com
- SMTP Port – 465 (SSL) or 587 (TLS)
- SMTP Secure – SSL, TLS or Disabled
- SMTP Username – Your Gmail address
- SMTP Password – Your Gmail password
For Gmail, it is also necessary also to turn on the “Allow less secure apps” option in your Gmail account.
- 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.
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 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 “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 “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.
Scheduled Notifications (cron)
cron is a Linux utility which 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
Ideakit Crontrol plugin is the best option if you’re not familiar with cron jobs. If you decide to use Ideakit 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.