Form Decode: Specify Send to, Subject, and Sender

Specify Send to, Subject, and Sender

Normally, email address for Send to (address) and Sender (From) of an email sent through Form Decode belongs to the website administrator, and the Subject will be output from formdecode.cgi. However, these can freely be specified by using the <INPUT> tag.

Specify a Send to email address

<input type="hidden" NAME="_to" VALUE="send to email address">

By specifying _to for the NAME attribute in <INPUT> tag, email is sent to the email address specified for the VALUE attribute.

By specifying text for the TYPE attribute, you can also make visitors to enter send to email addresses. However, this does not ensure that visitors will always enter the correct address
It is recommended to specify a fixed send to address using hidden. You can also make the form to send to more than one email address by separating addresses using commas.

Specify subject

<input type="hidden" NAME="_subject" VALUE="subject">

If _subject is specified for the NAME attribute in <INPUT> tag, the character string specified for the VALUE attribute will the subject when sending email.

By making the TYPE attribute text, you can also make visitors to enter the subject of email. If kanji is entered in this case, it will be shown in ISO-2022-JP format.

Specify sender

<input type="hidden" NAME="_from" VALUE="sender’s email address">

By specifying _form for the NAME attribute in <INPUT> tag, email address specified for VALUE attribute will be the sender of email.

By specifying text for the TYPE attribute, you can specify email addresses entered by visitors as the sender.Since the entered email address is not always ensured to be correct, it is recommended to ask visitors to enter more than one contact address.

Example of how to write and use (FreeAddress)

HTML (Form Decode)

<BODY>
<form ACTION="https://cgi.www.ne.jp/cgi-bin/formdecode.cgi" METHOD="POST">
<input type="hidden" NAME="_to" VALUE="ab4t-ash@asahi-net.or.jp">
<input type="hidden" NAME="_subject" VALUE="from form decode">
<input type="hidden" NAME="_from" VALUE="test@asahi-net.or.jp;>
name <input type=" text" NAME="name"><br>
gender <input type="radio" NAME="gender" VALUE="male">Male <input type="radio"
NAME="gender">Female<br>
What is your favorite color?
<SELECT NAME="color">
<option selected>Please choose.</option>
<option VALUE="red">Red</option>
<option VALUE="blue">Blue</option>
<option VALUE="yellow">Yellow</option>
</SELECT><br>
Where do you want to go?<br>
<input type="checkbox" NAME="usa" VALUE="on">United States<br>
<input type="checkbox" NAME="china" VALUE="on">China<br>
<input type="checkbox" NAME="france" VALUE="on">France<br>
<input type="checkbox" NAME="germany" VALUE="on">Germany<br>
Comment<br><textarea NAME="comment" ROWS="4" COLS="30"></textarea><br>
<input type="submit" VALUE="Send"><input type="reset" VALUE="Reset">
</form>
</BODY>

An HTML file with <INPUT> tag which specifies the Send to, Subject, and Sender.

How Form Decode is shown

Name 
Gender Male Female
What is your favorite color?
Where do you want to go?
United States
China
France
Germany
Comment

How you receive

Email header
Send to: ab4t-ash@asahi-net.or.jp
Subject: From Form Decode
Sender: test@asahi-net.or.jp
Body
color=Red
comment= Cheap.
france=on
name=Asahi, Taro
gender=male
usa=on

The email you receive. The send to field, subject, and sender should be the ones you specified.

Back to top of the page