[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-1-en-105":3,"doc-seo-173527-105":53,"doc-detail-173527-en":126},{"code":4,"msg":5,"data":6},0,"success",[7,14,19,24,29,34,39,44,49],{"id":8,"doc_module":9,"doc_module_name":10,"category_name":11,"show_sort_weight":12,"slug":13},11,1,"Template","Presentations",90,"presentations",{"id":15,"doc_module":9,"doc_module_name":10,"category_name":16,"show_sort_weight":17,"slug":18},12,"Resumes",80,"resumes",{"id":20,"doc_module":9,"doc_module_name":10,"category_name":21,"show_sort_weight":22,"slug":23},14,"Invoices",70,"invoices",{"id":25,"doc_module":9,"doc_module_name":10,"category_name":26,"show_sort_weight":27,"slug":28},15,"Posters",60,"posters",{"id":30,"doc_module":9,"doc_module_name":10,"category_name":31,"show_sort_weight":32,"slug":33},16,"Social Media",50,"social-media",{"id":35,"doc_module":9,"doc_module_name":10,"category_name":36,"show_sort_weight":37,"slug":38},17,"Forms",40,"forms",{"id":40,"doc_module":9,"doc_module_name":10,"category_name":41,"show_sort_weight":42,"slug":43},18,"Letters",30,"letters",{"id":45,"doc_module":9,"doc_module_name":10,"category_name":46,"show_sort_weight":47,"slug":48},21,"Paper Templates",5,"papers-templates",{"id":50,"doc_module":9,"doc_module_name":10,"category_name":51,"show_sort_weight":4,"slug":52},158,"General","general-158",{"code":4,"msg":54,"data":55},"ok",{"site_id":56,"language":57,"slug":58,"title":59,"keywords":60,"description":61,"schema_data":62,"social_meta":119,"head_meta":121,"extra_data":123,"updated_unix":125},105,"en","mailform-a-cgi-script-processing-forms","mailform - A CGI-Script Processing Forms | DOCX","","mailform is a CGI script that processes submitted web forms and sends the collected field content to a specified recipient email address. It is triggered via HTML form POST actions, optionally using a secure-script endpoint. The script relies on predefined variables such as ---TO, -FROM, -NAME, and -Subject, while passing other field names and values into the mail body. It also supports configurable post-submission feedback, including custom confirmation text, inclusion of HTML templates, redirection, printing variables, copy-to-sender, required-field checks, sorting, and custom error templates.",{"@graph":63,"@context":118},[64,80,101],{"@type":65,"itemListElement":66},"BreadcrumbList",[67,71,74,77],{"item":68,"name":69,"@type":70,"position":9},"https://docshare.wps.com","Home","ListItem",{"item":72,"name":10,"@type":70,"position":73},"https://docshare.wps.com/template/",2,{"item":75,"name":36,"@type":70,"position":76},"https://docshare.wps.com/template/forms/",3,{"item":78,"name":59,"@type":70,"position":79},"https://docshare.wps.com/template/mailform-a-cgi-script-processing-forms/173527/",4,{"url":78,"name":59,"@type":81,"image":82,"author":87,"headline":59,"publisher":90,"fileFormat":93,"inLanguage":57,"description":61,"dateModified":94,"datePublished":95,"encodingFormat":93,"isAccessibleForFree":96,"interactionStatistic":97},"DigitalDocument",{"url":83,"@type":84,"width":85,"height":86},"https://docshare.wps.com/thumbnails/mailform-a-cgi-script-processing-forms/173527.png","ImageObject",442,249,{"name":88,"@type":89},"Cart","Person",{"url":68,"name":91,"@type":92},"DocShare","Organization","application/vnd.openxmlformats-officedocument.wordprocessingml.document","2026-09-26","2026-09-01",true,{"@type":98,"interactionType":99,"userInteractionCount":76},"InteractionCounter",{"@type":100},"ViewAction",{"@type":102,"mainEntity":103},"FAQPage",[104,110,114],{"name":105,"@type":106,"acceptedAnswer":107},"How does mailform send form results after submission?","Question",{"text":108,"@type":109},"It processes the submitted HTML form fields and delivers them as email content to the configured recipient address, with additional fields passed by name and value into the mail body.","Answer",{"name":111,"@type":106,"acceptedAnswer":112},"Which variables does mailform require in the HTML form?",{"text":113,"@type":109},"At minimum, it expects ---TO (recipient), -FROM (sender email), -NAME (sender real name), and -Subject (email subject), typically supplied via hidden fields or values set in the form.",{"name":115,"@type":106,"acceptedAnswer":116},"What options control what the user sees after the form is submitted?",{"text":117,"@type":109},"Control variables like -footer can show confirmation text, optionally including an HTML template parsed after submission, and other flags can print variables, send a carbon copy to the sender, enforce required fields, sort displayed fields, or specify a custom error template.","https://schema.org",{"og:url":78,"og:type":120,"og:title":59,"og:site_name":91,"og:description":61},"article",{"robots":122,"canonical":78},"index,follow",{"doc_id":124,"site_id":56},173527,1788402297,{"code":4,"msg":5,"data":127},{"doc_id":124,"user_id":128,"nickname":88,"user_avatar":129,"doc_module":9,"category_id":35,"category_name":36,"doc_title":130,"doc_description":131,"doc_content":132,"file_id":133,"file_url":134,"file_type":135,"file_size":136,"view_count":137,"is_deleted":4,"is_public":9,"is_downloadable":9,"audit_status":9,"page_count":73,"language":138,"language_code":57,"site_id":56,"html_lang":57,"table_of_contents":139,"faqs":140,"seo_title":59,"seo_description":61,"update_tm":125,"read_time":9},18829141979164,"https://eur-avatar.wpscdn.com/davatar_6f874abed73319feea01a86fa6f0fab8","mailform - A CGI-Script Processing Forms","\u003Cp>mailform is a CGI script that processes submitted web forms and sends the collected field content to a specified recipient email address. It is triggered via HTML form POST actions, optionally using a secure-script endpoint. The script relies on predefined variables such as ---TO, -FROM, -NAME, and -Subject, while passing other field names and values into the mail body. It also supports configurable post-submission feedback, including custom confirmation text, inclusion of HTML templates, redirection, printing variables, copy-to-sender, required-field checks, sorting, and custom error templates.\u003C/p>","\u003Cp>mailform: A CGI-Script Processing Forms\u003C/p>\u003Cp>The cgi-script mailform processes a variety of forms and sends their content to a specified e-mail address. It is invoked by\u003C/p>\u003Cp>&lt; FORM METHOD=\"POST\" ACTION=\"/cgi-bin/mailform\"&gt;\u003C/p>\u003Cp>and may also be invoked as secure-script using\u003C/p>\u003Cp>&lt; FORM METHOD=\"POST\" ACTION=\"/cgi-bin/ssl-dir/mailform\"&gt;\u003C/p>\u003Cp>in the basic HTML-document of the form. In order to process the form correctly, the script expects a couple of predefined variables. They must be declared in the HTML-document of the form exactly as described below and set to a value either in the form itself or in the HTML-document using hidden fields. Other variables and attributes may be introduced in the form corresponding to its specific elements. They constitute the content of the form and are passed by name and value to the recipient of the mail.\u003C/p>\u003Cp>---TO\u003C/p>\u003Cp>Recipient of the mail (required). The value is typically set in a hidden field, e.g. &nbsp;and the recipient address must be within the domain uzh.ch, eg. \u003C/p>\u003Cp>--CC\u003C/p>\u003Cp>e-mail address to which a carbon-copy is sent (optional)\u003C/p>\u003Cp>--BCC\u003C/p>\u003Cp>e-mail address to which a blind-copy is sent (optional)\u003C/p>\u003Cp>-FROM\u003C/p>\u003Cp>e-mail address of the sender of the form (required)\u000bIn order to allow JavaScript form-checking you may use JAVA_SCRIPT_FROM_ADDRESS instead of -FROM.\u003C/p>\u003Cp>-NAME\u003C/p>\u003Cp>Real name of the sender (required)\u000bIn order to allow JavaScript form-checking you may use JAVA_SCRIPT_NAME instead of -NAME.\u003C/p>\u003Cp>-Subject\u003C/p>\u003Cp>Subject of the mail (required). May be defined in a hidden field, see example above.\u003C/p>\u003Cp>-BASE__URL\u003C/p>\u003Cp>URL of a document to which an error message will point in case of an error (optional). Usually you will set the value to the URL of your form. Note the double \"__\". To customize error-messages use --errortemplate (see below).\u003C/p>\u003Cp>The information above constitutes the MAIL-HEADER and will not be part of the MAIL-BODY, except for the name of the submitter. The MAIL-BODY contains the variables, attributes and values of the fields which are defined by the composer of the form (i.e., of the basic HTML-document).\u003C/p>\u003Cp>Configuration of information presented after submission\u003C/p>\u003Cp>The following control variables determine the information presented to the user after submission. They may be set optionally.\u003C/p>\u003Cp>-footer\u003C/p>\u003Cp>Text appearing on the confirmation-page.\u003C/p>\u003Cp>If you use &lt; ... VALUE=\"INCLUDE: pathname/filename\"&gt; the HTML-document specified by filename is parsed by the web-server after submission. The pathname/filename describes the full-path of the HTML-document, e.g. /usr/local/ftp/id/public_html/koord/www/mailform_parsed.html. \u000bValues of individual variables may be included in the document by $VARIABLENAME.\u003C/p>\u003Cp>If the document you want to parse resides on UniCMS, you should use \u000b&lt; ... VALUE=\"INCLUDE: http://www.yoursite.uzh.ch/path-to-file&gt;\"&gt;. The URL specified is then parsed after submission. In this case, you must envoke mailform using your virtual hostname in the action, e.g.\u000b&lt; FORM METHOD=\"POST\" ACTION=\"http://www.yoursite.uzh.ch/cgi-bin/mailform\"&gt;\u000botherwhise the specified document residing on UniCMS will not be correctly parsed.\u003C/p>\u003Cp> &nbsp;If you use &lt; ... VALUE=\"REDIRECT:URL\"&gt; (the URL must be complete, eg. \u0013 HYPERLINK \"http://www.id.uzh.ch/cl/dl/web/formular/answer.phps\" \u0014http://www.id.uzh.ch/cl/dl/web/formular/answer.phps\u0015) all fields are passed using the GET-Method to the specified URL using URL?field1=value1&field2=value2&...fieldX=valueX. This may be useful if you pass the input to a php-script which generates a pdf-document. This \u0013 HYPERLINK \"http://www.id.uzh.ch/cl/dl/web/formular/answer.phps\" \\t \"_blank\" \u0014example\u0015 may illustrate how you can work with your variables in a php-script.\u003C/p>\u003Cp>\u003Cbr>\u003C/p>\u003Cp>-printVAR\u003C/p>\u003Cp>&lt; ... NAME=\"-printVAR\" VALUE=\"1\"&gt; prints the name and value of all variables on the con\u003C/p>","cbCaigUdTFCGYyuO","https://ap.wps.com/l/cbCaigUdTFCGYyuO","docx",23395,8,"English","# MAIL-HEADER and MAIL-BODY Mapping\n## Predefined Required Variables\n## Optional CC/BCC and Configuration Controls\n## Post-Submission User Feedback\n## Error Handling and Custom Templates\n## Saving Form Output to a File","[{\"question\":\"How does mailform send form results after submission?\",\"answer\":\"It processes the submitted HTML form fields and delivers them as email content to the configured recipient address, with additional fields passed by name and value into the mail body.\"},{\"question\":\"Which variables does mailform require in the HTML form?\",\"answer\":\"At minimum, it expects ---TO (recipient), -FROM (sender email), -NAME (sender real name), and -Subject (email subject), typically supplied via hidden fields or values set in the form.\"},{\"question\":\"What options control what the user sees after the form is submitted?\",\"answer\":\"Control variables like -footer can show confirmation text, optionally including an HTML template parsed after submission, and other flags can print variables, send a carbon copy to the sender, enforce required fields, sort displayed fields, or specify a custom error template.\"}]"]