Form to Email Plugin
formToEmail Plugin allows you to add forms to your pages.
The content of the form will be sent via email to any email address (or addresses) you specify.
Sample usage
You would add something similar to this to one of your pages (make sure there are no spaces between the brackets:
[formToEmail ]
[subject=Message from {1}] [[email protected]][from={2}]
[Your Name:|text|required]
[Your Email:|text|required]
[Your Message:|textarea|required]
[/formToEmail]
Fields are specified by [LABEL|INPUT TYPE|REQUIRED FLAG]
Only LABEL and INPUT TYPE are necessary to add a field to the form. INPUT TYPE can be: text or textarea.
Additional data
To specify where to send the email, use:
[to=YOUR ADDRESS HERE] You can specify several addresses separated by commas
To specify what address to use as the sender, use:
[from=EMAIL ADDRESS]
To add a custom subject use:
[subject=YOUR SUBJECT]
To customize your "Thank you" message (message that appears after the user has successfully submitted the form) use:
[thankYouMessage=YOUR MESSAGE] (do not use html in this message)
Numbers in brackets {} will be replaced by data supplied by user when the form is submitted. In this way, you can use an email address as the "from" attribute of the email or use the name entered as part of the subject for example. Numbers indicate field order. In the above example, "Your Name:" is number 1, and "Your email:" is number 2.
Formatting
Between the form fields, you can add html markup. You can also add html markup inside the brackets if, for example, you wanted to make the labels bold, or to add a break between the label and the form field.
Note: This plugin only handles one form per page.
I can get the plugin to show the form and it seems to function correctly but I never receive an email when the form is used. Is there something special about the [to=email] part of the code that I might need to know?
Thanks
Are you able to receive email in other places, like when someone writes a comment? I would check the undeliverable folder in CF and the mail logs in the CF administrator to see what the problem might be.
I am trying the plugin.
Form is this:
[formToEmail]
[thankYouMessage='Thanks for your message. I will reply as soon as possible.']
[subject=Message from {1}] [[email protected]][from={2}]
[Your Name:|text|required]
[Your Email:|text|required]
[Your Message:|textarea|required]
[/formToEmail]
I am getting this error:
An error occurred while trying to encrypt or decrypt your input string: Given final block not properly padded.
at cfHandler2ecfc2120875415$funcPROCESSEVENT.runFunction(D:\inetpub\vhosts\andreacfm.com\httpdocs\components\plugins\user\formToEmail\Handler.cfc:194)
The plugin is only set up to show the form in pages, not posts.
how can i change the text after the captcha image, ie transale it in other lang?
regards
The captcha image is placed by the captcha plugin. Unfortunately, it doesn't have the ability to change languages from the admin, but you can change the plugin code.
I'd actually recommend to disable the captcha and use the cfformprotect plugin: http://www.mangoblog.org/news/goodbye-captcha-hello-cfformprotect
My host requires me to use my login and password
to send mail to help prevent spam.
Is there a way to pass this info.
This plugin uses the global email settings set in the config.cfm file. If your server requires authentication, then you need to fill in the information in that file, inside the "mailServer" node there are keys for "server" "username" and "password".
An error occurred while trying to encrypt or decrypt your input string: Given final block not properly padded.
at cfHandler2ecfc2120875415$funcPROCESSEVENT.runFunction(D:\inetpub\vhosts\andreacfm.com\httpdocs\components\plugins\user\formToEmail\Handler.cfc:194)
[/formToEmail]
I am getting this error:
An error occurred while trying to encrypt or decrypt your input string: Given final block not properly padded.
at cfHandler2ecfc2120875415$funcPROCESSEVENT.runFunction(D:\inetpub\vhosts\andreacfm.com\httpdocs\components\plugins\user\formToEmail\Handler.cfc:194)
Please ask the question in the forums. Do you get that issue every time you use it?
I activeted the plugin that ships with Mango, created a new page and pasted the formToEmail sample code into the TinyMce editor and save it. The only thing I get is the same code posted between <p></p>.
Am I missing something?