Verifying an e-mail address
Problem
You need to make sure that an e-mail address obtained in a questionnaire is valid.
Solution
Use the test_email_address function in a CALCUL question.
Discussion
Getting e-mail addresses as part of Web data collection or telephone surveys is notoriously error-prone. The test_email_address function verifies whether a given e-mail address is (probably) deliverable. This function requires that the Net::Telnet Perl module be installed on the server. Calling this function is as simple as:
where ATEST is the open-end part that contains the result of the test and AEMAILADDRESS is the name of the open-end part containing the e-mail address.
The function returns one of the following codes. The CallWeb script can then branch to the appropriate next place in the questionnaire using habitual flow control tools like branching and display conditions.