FAQ - WAnewsletter 2.2-RC2b


Here is a list of the most frequently asked questions, and corresponding explanations.

Sommaire
  1. How to display the number of subscribers on my site ?
  2. WAnewsletter, a multilingual script ?
  3. How to be informed of a new version release ?
  4. How to import emails ?
  5. How to have multiple users manage the script?
  6. Where is the subscription form located ?
  7. Why are there two send engines ?
  8. Script's temporary folder, safe mode and open_basedir
  9. Cannot attach files to my newsletters !
  10. Using a smtp server to send emails
  11. Calling the subscription form via a popup window
  12. Methods for addresses email validation
  13. Statistics directory name change
  14. Send newsletters with cron

I. How to display the number of subscribers on my site?
To do this, simply insert the following code where you want to display the number of subscribers. (be carefull to put the right link to the extra.php file)

<script language="JavaScript" type="text/javascript" src="http://www.yourdomain.com/rep/options/extra.php?liste=[ID]"></script>

Replace [ID] by the ID number of the list of which you want to display the number of subscribers.
Top

II. WAnewsletter, a multilingual script?
Since our goal is to make WAnewsletter available to the largest audience, the script manages different languages.

If you are fluent in a language in which the script has not already been translated, and if you want to promote WAnewsletter, simply download the package of your choice, translate it and send it to wascripts@phpcodeur.net.
The new language version will be made available for downloading, after verification.
Top

III. How to be informed of a new version release ?
To be informed of a new version release, or newly found security failures (improbable ? :) ), visit the phpCodeur site every now and then, or simply subscribe to the WAnewsletter mailing listhere.
Top

IV. How to import emails ?
An import utility is available under the "Tools" header of the administration menu. This utility will allow you, if you have proper rights, to import subscribers' emails directly either through a text field, by specifying the address of the emails file on the server, or by uploading a file containing the emails, providing your host allows file uploading.
The import utility has been tested with mass imports of up to 2500 email addresses. This should be sufficient. If not, you can divide to import operation in as many smaller parts as necessary to make sure it works.
Another way to import more than 2500 email addresses in one shot consists in modifying the value of the MAX_IMPORT constant in the constantes.php files, but this is at your own risks !

The script will check each email address, and will remove doubles. If emails are rejected, the script will attempt to write a report file in its temporary folder, which you then may download.
Top

V. How to have multiple users manage the script ?
WAnewsletter can be managed by multiple users.
You can change the users' permissions through each user's profile..
There are two general levels : administrator and user. Administrators have all rights automatically, whatever the settings on individual rights.
A user will be limited to granted rights (view, edit, delete, send, import, export, ban, and attach files) for each list.

To add a user, go to the "Users" section and click on the "Add a user" button.
Top

VI. But where is the subscription form ?
There already is a default subscription form, the subscribe.php file (users of versions 2.0.x or 2.1.x, please note that the name of that file has changed because of its wrong spelling and is therefore no longer suscribe.php, so do not forget to change any links pointing to that file).
The subscribe.php file displays a standard form, and a selection list showing names of all created lists.
The script also has a form generator in the tools section. This will allow you to generate an adequate form for any given list.
You will then have to place this generated form code where you want on your site, to place the newsletter.php inclusion code (also created by the Form Generator) and to indicate in the list's settings the form's absolute address.

One last solution (available from versions 2.2-RC1 and up) consists in having the visitor send an email to a list's address, with the word "Subscribe" (case insensitive) on the subject line.
In this case, you must have access to cron (Unix servers or equivalent) or use the free services of webcron.org to automate the call to the cron.php file located in the script's options/ folder. The script will undertake all necessary tasks (subscription, unsubscription, format change, subscription confirmation, etc.) according to received emails.
To unsubscribe, the subscriber will have to send an email to the list's address with the word "Unsubscribe" on the subject line. He will then receive an email asking for a reply with the same subject, his account code, which he will already have.

To confirm subscription (if the list is set to require it), the subscriber will have to send an email to the list with the word "confirmation" on the subject line. To request a newsletter format change, the subject line will have to read "setformat".

If many of your distibution lists use the same email address, there is a risk of conflict, since the script will not be able to identify to which list the pop account emails are addressed. If such is the case, you will have to create an email alias on your host's administration panel, if available (this excludes free hosting servers).

Example :

You have two lists using mailing@domain.com as email address.
You will have to create two aliases forwarded to mailing@domain.com and specify these aliases in the settings of the lists, eg : mailing-1@domain.com and mailing-2@domain.com

In the case of the "cron" option, you will have to specify the access parameters to the list's email adress's pop account and specify the use of the"cron" option by clicking on the proper radio button, in the admin Lists section.
Finally, cron will have to call an address of this type : http://www.yourdomain.com/rep/newsletter/options/cron.php?liste=[list_ID]
Top

VII. Why are there two send engines ?
In order to be accessible to the largest number of users, WAnewsletter has two send engines.
Certain hosting services limit the number of emails sent daily (ex: multimania/lycos), or only accept one recipient by email (ex: online).
Using the fist engine (emails in hidden copy) gives a more professionnal impression (in my personal opinion).
On the other hand, by using the second engine, recipients will see ther email address in the "To" field. Also, the unsubscribe address will contain the correct parameters, instead of simply pointing back to the subscription/unsubscription form.

In the end, it is up to you to choose the engine that suits you best ;-)

P.S: People hosted on "Online" must use the second engine (one subscriber = one email)
Top

VIII. Script's temporary folder, safe mode and open_basedir
The script's temporary folder, tmp/ by default, can be used by the script in some specific cases :
  • If safe mode in activated on your server, or if there is some restriction at the open_basedir level, the script must move certain uploaded files in the tmp/ folder before reading them.
  • If you store attached files on a ftp server, the script must put them in the tmp/ folder during the sending process
  • When exporting attached files, or backing up tables, if you choose the "store the file on the server" option, the script will create the file in the tmp/ folder.
  • When importing email addresses, if some are rejected, the script will create the report file in the tmp/ folder
If one of theses cases applies to your situation (eg: open_basedir) or you want to use some of the script's possibilities (eg: storing the export file on the server), then the tmp/ folder is necessary and must be writeable.

The tmp/ folder's name can be modified, provided you specify its new name in the admin/pagestart.php file (find the line : $tmp_name = 'tmp'; )
Top

IX. Cannot attach files to my newsletters !
If file upload is authorized by your host, it might be caused by the script not having writing permissions on the attached files storage folder, or because the ftp server's access parameters are not properly set (if this option was chosen).
Check the folder's chmod and/or attributes, or check the ftp's access parameters.

If file upload is not authorized, the script adds the file to the list of attached files only if it is already on the server, in the attached files storage folder.
Upload your attached files with your ftp client, before adding them using the form.
Top

X. Using a smtp server to send emails
Unfortunately, using WAnewsletter's smtp option does not permit to send emails to recipients other than those whose address is of the same domain as the smtp server's if you are not identified as part of this domain. This is a smtp server restriction (relay denial), not WAnewsletter.

Example :

You set smtp.wanadoo.fr as smtp server in the Wanewsletter settings.
If the smtp server does not identify you as being part of the wanadoo domain, you will only be able to send emails to blablabla@wanadoo.fr type addresses.

The workaround is to have the smtp server that you want to use manage the authentification, or in other words, that it recognizes the AUTH LOGIN command (cf : RFC 2554).
In this case, you can specify the server access login and password in the newsletter settings.
Top

XI. Calling the subscription form via a popup window
Integrating the subscription form to your site by calling it with a popup window is very simple.

Here is the code :

<a href="#" onclick="window.open('path_to_folder/subscribe.php','mailing','width=400, height=300, topmargin=2, left=100, top=100, toolbar=0, location=0, directories=0, status=0, scrollbars=1, resizable=1, copyhistory=0, menuBar=0'); return false;">Newsletter</a>br />

In each of the newsletter's settings, you must enter the absolute url to the form
(eg : (http://yourdomain.com/rep/subscribe.php)

However, when a new subscriber clicks to confirm his subscription, or if he unsubscribes using the provided link in the newsletter, subscribe.php will appear on a full page.
Top

XII. Methods for addresses email validation
To verify the validity of addresses emails provided to the subscription, the script verifies their syntactic validity.
Some characters cannot be present and email must contain arobase sign and one point for the domain name.

You can adjust the script so that a deepened verification is done. (see configuration)

The deepened validation extracts the name of email domain, after do a research then over to verify that this domain arranges well
a Mail eXchanger.
If it is the case, the script tempts to connect to the smtp server (if the connection fails, the script will test the following smtp server...) then send orders to simulate a consignment.
If smtp server accepts to achieve the consignment (nothing is sent,the script won't finish with the adequate order), email makes part of his domain.

This last verification is not however guaranteed at 100%.
Smtp Servers refuse a demand of an outside entity in general (the script in this case) to their domain for the consignment of an email to an outside address to his domain, but this is not still the case. (We speak in this case of smtp server accepting the relaying).

The best validation remains to send an email to confirm the demand.
Top

XIII. Statistics directory name change
To change the directory name tstats/, it's easy, edit the functions.stats.php file and find cherchez the following line :

define('WA_STATS_PATH' , $waroot . 'stats/', true);

Replace"stats" by the name of your choice.
Top

XIV. Send newsletters with cron
The script gives the possibility to achieve your consignments of newsletters with cron.
It's very easy, call the following address : http://www.yourdomaine.com/rep/options/cron.php?mode=send&liste=[ID]

The part that is not put in bold is to adjust by your cares.
You also must there replace [ID] by identifying of the concerned list.

Note:
  • You can change the name of the cron.php file very well. (recommanded)
  • It is your turn to adjust cron so that it achieves to calling the script so cron is not available on your server, you can use for exemple the free services of webcron.org
Top


Powered by phpCodeur © 2002-2003 | WAnewsletter 2.2-RC2b
This script is freely distributed under the GPL license