How do I debug FormMail?
Thus article details how to debug FormMail.
This example demonstrates the debug attribute, in case FormMail is not doing what you think it should. Try a demo.
<html> <head><title>Just testing</title></head> <body> <form method="post" action="http://www.uic.edu/htbin/cgiwrap/bin/formmail/FormMail/depts/accc/webpub/formmail/example-5.txt"> <h1>Example of FormMail 3.0</h1> This is identical to example3, except that the config file uses the <code><b>debug</b></code> option. Therefore no mail will be sent, and the html response will be more useful for debugging, rather than for users. <hr> <p> My email address is: <input type="text" name="email" > <p> FormMail 2.0 is such an improvement over 1.0 that:<br> <input type=radio name="radbut" value="socks"> My socks were knocked off!<br> <input type=radio name="radbut" value="chair"> I fell of my chair.<br> <input type=radio name="radbut" value="big deal"> What's the big deal? Just use postcards. <br> Free-form comments, if you like; <textarea name=comments rows=5 cols=60> </textarea> <hr> <input type="submit" value="Submit your comments"> </form> </body> </html>
<!DOCTYPE form SYSTEM 'FormMail-3.0.dtd'> <!-- note the "debug" attribute. Otherwise this is identical to example3. --> <form debug name="example5" > <!-- I really want your email address --> <validate name="email" public="Your email address" vtype="email"> <!-- Mail will indeed be sent. Note that I capture your email address above and put it in the Reply-to field, so I can easily reply to notes sent to me from this form. --> <mail name="mail1" > <to>firstname.lastname@example.org <reply-to>$email <subject> FormMail 2.0 comments <body> $fm_date Radio button is: $radbut Comments were: $comments </mail> <!-- Here's the html response header Note that the full html page is generated, including the <html>...</html> tags --> <response name="r0" > <![CDATA[ <html><head><title>Test</title></head><body> <h1> Thank You for Submitting your Comments</h1> <P> I hope I find them useful. :-) <p> -Bob </body></html> ]]> </response> </form>