AtomChat’s Offline Email notification feature allows registered users on your website with a valid email address to receive automatic Email notifications when a user receives a message when he/she is offline.As of now, the Email notification is available for One-on-One/Private & Group Chat for the following features:
Following are the steps to enable Email notification from AtomChat’s Admin Panel Step 1: Log in to AtomChat Admin Panel with your credentials.
Step 2: From the left menu click on “Features” & activate “Offline Email notifications”
Step 3:Click on Configure icon & enter the different details “SMTP host”, “SMTP username”, “SMTP password”, “From Email address”, “From name”, “Minutes for which a user must be offline to receive an email”.
Note: Please test your SMTP configuration before entering the details with the online tools available such as https://www.gmass.co/smtp-test. If the details work properly here, then it will work properly in AtomChat as well.
Modify the ‘HTML template’ as per your requirement & save it.
Note: Please make sure you have allowed access to new devices or application in google security settings.You can refer the following link:https://accounts.google.com/DisplayUnlockCaptcha
It simply means the number of minutes after which the user will receive the email if he/she is offline.If you have set this setting to “30” minutes then the user who is offline from the last 30 minutes or more will get an email notification.
Step 4: Customize your Email notification template as per your requirement.
Step 5: In “Offline Email notifications” settings you can see “Cron URL”. You have to set up a cron job as per your requirement. It's easy to set a cron job on easycron.com
A cron job is a command for scheduling a task to be executed for the specified time in the future. This is normally used to schedule a job that is executed periodically.
Example: You have two users: “User 1” & “User 2”. If “User 2” is offline from the last 20 minutes, he will get an Email notification on his registered email address as per the Cron Job settings in “Offline Email notification.”
Following are the steps to set Cron Job on easycron.com : Step 1: Create your account on easycron.com. Make sure you will have a paid account. Step 2: Log in to easycron.com with your credentials. You will be redirected to the dashboard where in the left menu you will see the ‘Cron Job’ button.
As you click on that button, a pop up will appear where details like URL to call, when to execute are the mandate. In the “URL to call” tab, enter the URL of AtomChat Cron Job (refer step 5 of “How to enable email notification” section). Please don’t enter the entire URL here. You need to enter URL till cron.php (Please refer the screenshot below). Also, select the execution time as per your requirement.
Step 3: Now click on the “HTTP” tab. Enter value in HTTP method & once you set HTTP method to POST, you will see HTTP message body option. In “HTTP message body” you need to enter parameters which are after “cron.php”. You will get the AtomChat cron URL as mentioned in step 5 of “How to enable email notification” section, from that URL you need to copy the part after cron.php (please refer Screenshot). Now click on the “Create Cron” button. If you have set an hour to execute option, then your Cron Job will run after every 1 hour.
There are two ways to set email address for each and every user.
1st method: You have to set the chat_email variable where you have already set the all other AtomChat variables. For example, chat_id, chat_name, chat_link, etc.
You have to pass the email address to the chat_email variable. For example,
Once your user will login to your website it will update the email address in AtomChat. Also, you can see the email in AtomChat Admin Panel⟶Users- - >Click on Edit user icon.
Note: You can see the email field/option in AtomChat Admin Panel if your Email notification feature is enabled from AtomChat Admin Panel.
2nd Method: You can use our create user or update user RESTFUL API to update the email address of each and every users.Please check the below-mentioned screenshot for the same.
1. Create User API -
2. Update User API -