We’d like to remind Forumites to please avoid political debate on the Forum.
This is to keep it a safe and useful space for MoneySaving discussions. Threads that are – or become – political in nature may be removed in line with the Forum’s rules. Thank you for your understanding.
📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!
'form to email'
Phyllis
Posts: 163 Forumite
in Techie Stuff
Does anyone know an easy way to add 'form to email' to a website (not using Wordpress)? The code should preferably be free, easy to edit, include captcha if possible and have no limit on the number of emails per month. A lot to ask I suppose.
Advice would be much appreciated.
Advice would be much appreciated.
0
Comments
-
What backend technology do you have; php, perl etc0
-
I use php to do this. Very easy to configure a script, and it isn't limited (although I'm a little worried by what that means??). Do you have hosting with mailboxes, or do you want a complete email solution to go along with the form?
Captcha is available as a free script from http://captcha.net0 -
Mail forms are one of the most frequent targets for script kiddies and spammers that there are. You are also dependent on the person completing the form correctly entering their email address and even with some validation and requiring it to be entered twice people still get that wrong.
If your hosting permits the use of Apache mod rewrite you can get away with using an obscured form of the mailto: link which uses the senders email client so is safe from spambots and guarantees a good return address.
Create a directory called mail and pop a .htaccess file in there containingOptions +FollowSymLinks
RewriteEngine On
RewriteBase /
# With subject - mail/domain/com/user/subject
RewriteCond %{REQUEST_URI} ^/mail/(.*)/(.*)/(.*)/(.*)$
RewriteRule ^.* mailto:%3@%1.%2?subject=%4 [R,L]
# No subject - mail/domain/com/user
RewriteCond %{REQUEST_URI} ^/mail/(.*)/(.*)/(.*)$
RewriteRule ^.* mailto:%3@%1.%2 [R]
A link constructed per examples shown in the comments will kick off the visitors email client with the recipient (you) and optionally the subject pre-completed.
I'm not sure how many hosts allow this though....0 -
What backend technology do you have; php, perl etc
Yes, I've got php and perl as here:
http://www.qiq.co.uk/qiq3uk.php
I've tried to install QiQ's built in CGI form but haven't been able to edit this or get it to work.
Simple instructions would be much appreciated.0 -
Estate Agent, Web Designer & All Round Geek!0
This discussion has been closed.
Confirm your email address to Create Threads and Reply
Categories
- All Categories
- 352.5K Banking & Borrowing
- 253.7K Reduce Debt & Boost Income
- 454.5K Spending & Discounts
- 245.5K Work, Benefits & Business
- 601.4K Mortgages, Homes & Bills
- 177.6K Life & Family
- 259.4K Travel & Transport
- 1.5M Hobbies & Leisure
- 16K Discuss & Feedback
- 37.7K Read-Only Boards
