BEE supports sending e-mail from the web site using the "mailto" command. It differs from other form-mail scripts in several ways:
Firstly, "mailto" command does not show up in the <form ...> tag. You simply set the action="..." to the confirmation (or thank-you) page, where the "mailto" command is included.
Secondly, "mailto" command can send an e-mail without a form submission. You can use this to get alert messages directly from the web site.
Thirdly, "mailto" command does not disclose any parameters to the users including the recipient's e-mail address, not even from the page source view. All the users can see is the confirmation page, and by then the mail has already been sent.
This is to protect the privacy of the recipient and prevent the e-mail address from being scanned on the web site by online marketers.
Look at the following example:
<script language="bee">
if ('{sys%form:Submit}' == 'Send')
{
var param%mailto:from = {sys%form:user_email};
var param%mailto:fromname = {sys%form:user_name};
var param%mailto:subject = {sys%form:question};
var tomail = {sys%form:to_email};
if ('{tomail}' == '') var tomail = "info@onmyweb.net";
mailto "{tomail}" cc="sales@onmyweb.net,info@onmyweb.net"
bcc="custserv@accsoft.com.au"
ignore="user_email, user_name, Submit";
display "<h3>Form Mail sent</h3>\n";
}
</script>
<hr>
<form>
<table>
<tr valign=top>
<td>My e-mail:</td>
<td><input type=text name=user_email size=20></td>
</tr>
<tr valign=top>
<td>My name:</td>
<td><input type=text name=user_name size=30></td>
</tr>
<tr valign=top>
<td>Question:</td>
<td><input type=text name=question size=50></td>
</tr>
<tr valign=top>
<td>Details:</td>
<td><textarea name=Details cols=50 rows=5></textarea></td>
</tr>
<tr valign=top>
<td>Please reply by</td>
<td>
<select name=ReplyBy>
<option>e-mail</option>
<option>telephone</option>
<option>fax</option>
<option>post</option>
</select>
</td>
</tr>
<tr valign=top>
<td>To e-mail:</td>
<td><input type=text name=to_email size=20> (optional; for testing)</td>
</tr>
</table>
<input type=submit name=Submit value=Send>
</form>
|