Email Forecasts |
In HW 1.1, the idea of sending custom email forecasts was developed. In this early version, users could be allowed to subscribe to a forecast. Then if you automated the email script, HAMweather could send out daily forecasts. Well this feature has been expanded somewhat in HW2.
The HW2 software package comes with the ability to email forecasts to indivuals who have previously subscribed. HAMweather now includes the ability for users to unsubscribe from an email forecast. Along with this, support for NT based web servers and SMTP mail server has been added.
Subscribing & Unsubscribing
The hw2emailstorer.cgi script is the script that performs the actual subscribing and unsubscribing of users to the email forecast system. When a user subscribes or unsubscribes HW will also send them a notification email. The templates for these emails are in the "email" directory and named "subscribe.txt" and "unsubscribe.txt."
For demostation purposes, in the HAMweather demo provided, a "pass" template is used to allow users to subscribe and unsubscribe. You will notice a link to thi on the output of the zone forecasts.
The parameters that should be sent to the hw2emailstorer.cgi script are:
|
Sending of Emails
When it comes to the sending of the emails, the emailhw2.cgi script is used. The script can send email using a mail prog, such as sendmail on Unix systems, or by a SMTP server, used for NT systems. Refer to the Web based Email administration page for instrcutions on administering the needed settings.
If you want to offer this service to your web site visitors, you will need the ability to automate the emailhw2.cgi script. On Unix systems, this is best done using a cron job. You may need to have additional access, such as telnet, to be able to set cron jobs. If you are unsure whether you have the ability to automate scripts using cron (or crontab) contact your system administrators. If you have an NT server then contact your system administrator on the ability to automate scripts to run at predetermined times.
Finally, if you do not have the ability to automate scripts on your web server, you may set the email mode setting (refer to the Administration : Email page) tp allow the script to be ran from a web browser. Once this is set, you can type in the URL to the emailhw2.cgi script in your web browser. this wilkl cause the forecast emails to be sent. Remember, if you are using this method, you will need to navigate to the script daily to send forecasts daily.
Multiple Users
It should be noted that the Email Forecasts work on the user level. This means that each of the users can have their own email lists. Thus allowing web visitors to subscribe or not on each users weather site. This also allows the different users to schedule the forecasts to be sent to the emails in thier own lists at defferent time if so desired. Because of this you should provide the 'user' and 'theme' parameters when having the emailhw2.cgi script email out the forecasts. If your HW installation only has one user then these parameters are not needed, for HW will use the default user & theme.