|Top Previous Next|
For Delphi and .NET platforms
These are messages that you prepare in advance to send their users.
From the main screen of the Dev-Panel click on the icon then the "messages" screen will be displayed. From there click on the "Add Message" icon to open the data entry form and enter there the message data:
- Check Automatic if you want the message to be sent automatically.
- Enter the number of days (before or after) the expiry day.
- Enter the Subject of the message.
- Enter the message body.
- You can use the tags to include special fields according to the following breakdown:
<FIRST> : First User Name
<LAST> : Last User Name
<USERNAME> : Full User Name
<EMAIL> : User Email Address
<EDITION> : Product Edition Name
<EXPIRDAYS> : Remaining days before subscription expiration
<DISCOUNT> : Discount percent
<DISCDAYS> : Days before discount expiration to send email
<STATUS> : Subscription status. e.g. Pending, Active, expired.
<CR> : Carriage Return and Line Feed
Automatize sending messages
The linux servers have a utility called "Cron Jobs" to automate tasks, and is particularly useful when you want to send emails to users automatically. We must open the Control Panel and click on the corresponding icon:
From the "Common Settings" drop-down list select "Once a day" as seen in the image below:
This means we want it to run once a day.
Then in the "Command" field we enter the following:
wget -nv -O /dev/null http://www.xxxxxxxx.xxx/sspanel/sendmsgs.php >/dev/null 2>&1
where xxxxxxxx.xxx is the domain attached to the hosting.
Here we are calling the script sendmsgs.php your only goal is to call the sendEmails() function defined in libs.php. This is the content of sendmsgs.php:
The screen now looks like this:
We click on the "Add New Cron Job" button and see the new cron job added to the list. As shown below:
Now we have configured the cron jobs and once a day at 00:00, all preset emails that meet the conditions will be sent. Emails configured in the "Renewal message" and "Upgrade Message" fields we had seen when entering product data will also be sent.
From here you can send manually an email to all users in the list on the left. See the image below:
You can type it at the time or select it from a drop down list, and then click "Send message".