::Tillbaka     ::Home > FormMail äldre
 
#73
FormMail äldre
 
 

Formmail

Detta formmail scriptet är inte längre aktuellt, titta på Formmail Ny
Exempel kan laddas hem här

 

Vi har installerat ett formmail-script som mailar dig formulärsvar. Det enda du behöver göra är att skriva in dessa 2 rader i din HTML-text och ändra på "vaule=", till de inställningar som passar dig.

<form action = “http://script.digikom.net/formmail/mailform.exe” method = “POST”>
<input type = “hidden” name = “
_1_mailto” value = “e-postadressen som ska skickas till”>

E-postadressen måste finns med i vår mailserver.

Extra val:

<input type = “hidden” name = “_1_mailsubject” value = “ämne(subject) på mailet”>
<input type = “hidden” name = “_1_successdocument” value = “sökväg för en tacksidan”>

Överkurs: -endast på engelska-

The System fields are as follows:

Name Value
_1_MailTo The address to email the results to (eg fred@company.com)
_1_MailSubject The subject line of the email
_1_MailFrom The address email is to "come from" (can be any valid address)
_1_CCMailFrom The email is also sent to the address in the _1_MailFrom field
_1_SuccessDocument URL to return if the operation succeeds
_1_FailureDocument URL to return if the operation fails
_1_InvalidCardDocument URL to return for an invalid credit card number
_1_RequiredFieldDocument URL to return if a required field is missing
_1_CardNotAcceptedDocument URL to return for a credit card that's not accepted
_1_InvalidEmailDocument URL to return for an invalid email address
_1_NoHotmailDocument URL to return for a "hotmail" email address
_1_SortFields Set this field to cause fields to be sorted in the email
_1_StripEmptyFields Set this to cause empty fields to be removed
_1_AcceptedCards Set this to specify the credit cards accepted
_1_NoHotmail Set this to reject "hotmail" addresses
  • _1_ System Field

The system fields are used to control the operation of MailForm. They consist of defined Names with user-supplied values.

  • _1_MailTo

This is the email address to mail the results to. This must be valid in order for the email to be sent. You can put multiple email addresses on the one line, separated by commas. You can also have multiple _1_MailTo fields in the one form.

eg, _1_MailTo=fred@company.com

  • _1_MailFrom

This is the email address the email is to "come from". This can be left out (in which case it defaults to mailform@lss.com.au)but if it is supplied it must be a valid email address. The value can also be the name of another field in the form. This second option lets you take the content of another field and use it as the 'from' address for the email. For example, if you have a field where the user enters their email address, you would give the name of this field as the value of _1_MailFrom. The email would then appear to come from the user themselves.

eg, _1_MailFrom=results@company.com
eg, _1_MailFrom=_4_EmailAddress

  • _1_MailSubject

This lets you specify the subject line of the email. A default subject will be used if this is not supplied.

eg, _1_MailSubject=*** Form Submitted! ***

  • _1_CCMailFrom

If you specify this field, and set the value to 1, a copy of the email will be sent to the address specified by the _1_MailFrom field. If the _1_MailFrom field itself contains another field name, a copy will be sent to that address instead. The use of these two fields allows you to have a copy of the email sent automatically to the person that submitted the form.

eg, _1_CCMailFrom=1

  • _1_SuccessDocument, _1_FailureDocument, _1_InvalidCardDocument, _1_RequiredFieldDocument, _1_CardNotAcceptedDocument, _1_InvalidEmailDocument, _1_NoHotmailDocument

These fields are the URLs of the pages that are returned to the user, depending on the success or failure of the form submission. If they are not supplied, a brief default message will be shown to the user instead.

eg, _1_SuccessDocument=http://www.company.com/form_success.html

  • _1_SortFields

This field causes the field values in the email that is sent to be sorted either alphabetically or numerically. Sorting is performed on the field name itself, not the value of the field.

Set the value of this field to 1 if you want the fields sorted in alphabetical order. The _x_ header on the field name is ignored when sorting. Set the value of this field to 2 if you want the fields sorted numerically. In this case, you should prefix the name of the field (and follow the _x_ header, if any) with a number. This number will be used to sort the fields, but will not be displayed in the email. The following table shows the effects of both types of sorting.

Field Names       Unsorted       Sorted Alphabetically (1)
_3_CardNumber CardNumber CardNumber
HomeAddress HomeAddress EmailAddress
_4_EmailAddress EmailAddress HomeAddress
UserName UserName UserName

Field Names Unsorted Sorted Numerically (2)
_3_4CardNumber 4CardNumber UserName
2HomeAddress 2HomeAddress HomeAddress
_4_3EmailAddress 3EmailAddress EmailAddress
1UserName 1UserName CardNumber
  • _1_StripEmptyFields

    Set the value of this field to 1 to cause empty fields (where the user has not supplied a value) to be removed from the email message.

  • _1_AcceptedCards

    This field lets you specify which credit cards you can accept. If a card number is entered for a _3_ field that is not one of the cards you accept, the form is rejected and the _1_CardNotAccepted document is shown to the user. To specify the cards you can accept, you must add the required values from the following table and specify that as the value for the _1_AcceptedCards field:

    Mastercard      1
    Visa 2
    American Express 4
    Diners Club 8
    Discover 16
    JCB 32

    For example, a business that accepts only Mastercard, Visa and Amex, would specify _1_AcceptedCards=7   (1 + 2 + 4).

  • _1_NoHotmail

    This field lets you reject email addresses from "anonymous" email providers, like hotmail.com, yahoo.com and bigfoot.com. If specified, and the user enters one of these email addresses in a _5_ email field, the _1_NoHotmailDocument is shown to the user.

  • _2_ Ignore Field

The Ignore field can be added to the name of any fields on the form, to cause MailForm to ignore them. They will not be included in the email that is sent. For example, you can give the Submit button the field name _2_Submit, to prevent it being included in the email.

  • _3_ Credit Card Number Field

The Credit card number field lets you verify that a credit card number entered by the user is a valid card number (of course, it can only check that the card number is valid, not that the card itself is valid!). If any field names begin with _3_ MailForm will check to see whether the contents are a valid credit card number. If not, the operation will fail and the _1_InvalidCardDocument file will be served to the user. If you have specified a set of acceptable card types using the _1_AcceptedCards field, and the user enters a card number of a type that you can not accept, the  _1_CardNotAccepted document is shown to the user.

  • _4_ Required Field

If a field name begins with _4_, the field must be supplied by the user for the document submission to succeed. The contents of the field are not verified in any way - the field just must not be empty. If the submission fails because of a required field not being completed, the _1_RequiredFieldDocument file is served to the user.

  • _5_ Email Field

This field type lets you verify than an email address is valid. Anything entered in an email field is checked to see whether it conforms to the usual pattern of a valid email address - it must have a @ character and contain no spaces. If not, the form will be rejected and the _1_InvalidEmailDocument file is shown to the user. You can also use the _1_NoHotmail field to reject email addresses from anonymous email providers - if this happens, the user will be shown the _1_NoHotmailDocument file.

 

Article


Rate this article
0 users 0 of 5

Related articles
More related articles

Suggestions & Comments