Writing Custom Scripts
Mailman provides generic mail-sending scripts written in ASP* and PHP, and one of these should be compatible with most servers - the ASP script for Windows-based servers*, and the PHP script for UNIX-based servers.

If you need to, you can write and use your own script. The script may be written in any language supported by the server, such as ASP.NET*, CFM or JSP. The script must receive and work with variables passed using the HTTP POST method. The following variables are sent to the script by Mailman:

  • sn - Sender's Name
  • se - Sender's Email Address
  • rn - Recipient's Name
  • re - Recipient's Email Address
  • sub - Message Subject
  • msg - Message Body
In the message body, the carriage-return/line-feed combination is replaced by the following sequence:
    |^|
Before sending the message, your script should replace all instances of the |^| sequence with a carriage-return and line-feed (ASCII characters 13 and 10 respectively).

To use your own script, simply specify its URL in Mailman's ScriptURL parameter. If you use a relative URL to specify the script, remember that the URL must be relative to the location of the web page containing Mailman.

*ASP Script Note:
The supplied ASP script is for servers running IIS5 and earlier, which uses CDONTS for email. Users with IIS6/Windows 2003 Server can use an alternative script in the /applet/aspnet folder of this documentation. This alternative script requires a small customization, noted in a comment at the top of the file.