Message

Overview

Simple Email Form License

        Copyright 2010 - 2012 D. Bierer < This e-mail address is being protected from spambots. You need JavaScript enabled to view it. >
        Version    1.7.01

        This program is free software; you can redistribute it and/or modify
        it under the terms of the GNU General Public License as published by
        the Free Software Foundation; either version 2 of the License, or
        (at your option) any later version.
       
        This program is distributed in the hope that it will be useful,
        but WITHOUT ANY WARRANTY; without even the implied warranty of
        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
        GNU General Public License for more details.
       
        You should have received a copy of the GNU General Public License
        along with this program; if not, write to the Free Software
        Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
        MA 02110-1301, USA.

        * @package    mod_simpleemailform
        * @subpackage Modules
        * @link       http://joomla.unlikelysource.com/
        * @license    GNU/GPL, see above

Wish List

  • Ability to "hide" the "Subject" field and have it be automatically generated
  • Ability to re-order the fields;   Currently "From" and "Subject" fields are hard-coded to be first
  • Add a javascript color picker for CAPTCHA params
  • Add "valign" param for textarea
  • Drop down list (suggested by Rasha)
  • "From" field: suppress the display but allow it to be added automatically, pre-populated with a value

 

Installation

Login as Joomla Administrator    
Select Extensions - Extension Manager
Click on the "Install" tab.
Browse for the downloaded module and click the "Upload and Install" button.
   
In the Module Manager locate "Simple Email Form" and click to edit parameters.  
In "Module Details"  select the module position. You can use "user99" (or something like that) if you plan to place the module inside an article. If that is the case, make sure that you enter {loadposition user99} somewhere in the body of the article.    
Make sure the module is "published"!    
Under "Menu Assignment" make sure the module is assigned to at least 1 menu item.    
Select a language, the email to send results to and other "Basic" options.    
Enter CSS class, CAPTCHA options, file upload field, etc. in "Advanced" options.    
Save when done.    
Make sure "Content - Load Modules" is enabled if you want to use the Simple Email Form module inside an article. Check this by going to: Extension - Plugin Manager, and then making sure the "Content - Load Modules" plugin is enabled.    

Troubleshooting

If your emails are not getting sent:

  • Verify that your email addresses are correct
  • Upgrade to version 1.7.05+
  • Go to Advanced Options and activate Test Mode
  • Confirm that there are no errors reported from the mail server

If you see this error message:

Warning: require_once(): open_basedir restriction in effect. File(/usr/share/php/PEAR.php) is not within the allowed path(s): (/tmp:/var/tmp:/home/web/www.example.com/www) in /home/web/www.example.com/www/modules/mod_simpleemailform/CAPTCHA.php on line 22 Warning: require_once(/usr/share/php/PEAR.php): failed to open stream: Operation not permitted in /home/web/www.example.com/www/modules/mod_simpleemailform/CAPTCHA.php on line 22 Fatal error: require_once(): Failed opening required 'PEAR.php' (include_path='.:/usr/share/php:/usr/share/pear') in /home/web/www.example.com/www/modules/mod_simpleemailform/CAPTCHA.php on line 22

So the problem rises when the captcha script tries to include the pear script...

Solution: UPGRADE to version 1.7.01 or above

 

If you see this error message:

 

Warning: Missing argument 4 for sendResults(), called in <some/directory/path> on line 476 and defined in \path\to\joomla\modules\mod_simpleemailform\mod_simpleemailform.php on line 214

Solution: UPGRADE to version 1.1.12 or above

 

If you see this error message:

Error: Unable to cleanup old captchas

Warning: file_put_contents(/company/homepages/9/xyz/htdocs/images/captcha/captcha_12345.png) [function.file-put-contents]: failed to open stream: No such file or directory in /company/homepages/9/xyz/htdocs/FurtherIndications/modules/mod_simpleemailform/mod_simpleemailform.php on line 347

Most likely it is because:

(A) You have not configured a directory in which the program can write the CAPTCHA images, or
(B) You have misspelled the directory name, or
(C) You do not have the permissions set properly so that Joomla can write to this directory

 

Try the following:

  1. Look carefully at the directory path which is displayed in the error message. Notice, in the example above, "/company/homepages/9/xyz/htdocs/images/captcha/captcha_12345.png" is the file which could not be written.
  2. Login as the Joomla Adminstrator
  3. Select Extensions - Module Manager
  4. Locate and click on the link for the Simple Email Form module
  5. Look for "Directory to Write Captchas"
  6. Make sure that the directory path matches the one you see in the error message
    (In this example, it would be "/company/homepages/9/xyz/htdocs/images/captcha")

If the module doesn't appear

(Thanks to Chad for this tip)

(A) Make sure the module is enabled (that one has caught me LOTS of time and I wrote the dang module!).
(B) In the module manager, make sure that "Menu Assignments" is set to ALL (or whatever menu the article appears under).
(C) Go into the article which contains the module and make sure you correctly spelled {loadposition user99}
(or whatever user position you chose to use -- doesn't have to be "user99", it could be "emailform" or any other unique word -- BUT ... see note below).
(D) Make sure that whatever user position you chose matches the user position you specified in the module manager
(E) Go to "Extensions" - "Plugin Manager" and make sure that the "Content - Load Module" plugin is enabled.

 

(Thanks to Lars for this strange quirk)

If you go through all the suggestions above, and the module STILL does not appear, try changing the to something which starts with "user". Some templates are very particular about this. So, for example, if you used {loadposition emailform} change it to {loadposition user99}. Also, make sure that you go to Extensions - Module Manager - Simple Email Form, and change the position to match whatever you just used in the article which invokes the fast and easy email form.

 

(Thanks to Alzibiff for this tip)

If you see a T_STRING required on line 65 error, check and see if your server is runing PHP 4. This module uses Object Oriented Programming and won't work in PHP 4!

 

(Thanks to Tom for this one)

When I first installed the {loadposition user99} in an article, I copied the line of code from this page and pasted in into the editor in WYSIWYG mode. The editor inserted some extra html that was not displayed so the code looked OK but would not work. Once I edited the HTML and took out the /span statements, everything worked great. Maybe to is obvious but to noobs like me it all takes extra time. Thanks.

 

If the CAPTCHA image does not appear

FIRST -- check the tips above and make sure you've gone through all of that!

Q: The permissions on the actual captcha image are not getting set to allow it to display. The directory permissions are OK and when I check the recurse into subdir the captcha image permission update and it becomes visible on my website. How do I control the file permissions on the captcha image?

A: Check with your system adminstrator to make sure that the Joomla user's "umask" value is set properly. This is a file system issue and has nothing to do with the module!

Q: Thanks so much for the quick reply. This is my first Joomla website so I'm climbing a steep learning curve right now. My site is hosted at Network Solutions and they said they are not able to change the unmask parameter for security reasons. It appears that my /images/captcha directory has all the permissions necessary (777) but the image file is not accessible until I manually change the permissions, from 644 to 777. It seems odd that the file does not inherit the directory permissions. I'm kind of stuck at this point so I guess I'll keep hacking until I find a solution.

OK, so as I'm writing this message, I was testing and have found something new. It looks like if I use the Joomla Preview, the captcha file perms are set to 640 and do not display. If I view from a separate browser session, the permissions are set to 644 and it works. I also tested from a Macbook Pro with Safari and it worked, perms set to 644. Joomla Preview might be the culprit.
 
If you have errors with attachments
 
You might see a message like this:
Warning: move_uploaded_file(/Attachments/Logo Lettering.png) [function.move-uploaded-file]: failed to open stream: No such file or directory in /home/www/xyz/modules/mod_simpleemailform/mod_simpleemailform.php on line 157

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpgSqqOt' to '/Attachments/Logo Lettering.png' in /home/www/xyz/modules/mod_simpleemailform/mod_simpleemailform.php on line 157
 
1. Login as your Joomla administrator
2. Go to Extensions - Module Manager and select the simple email form module
3. Under Directory to Save Attachments enter a directory path which exists, and also one in which the module has the rights to create a file.
 
One recommendation would be to go to the Joomla Media Manager, create a folder for your uploads, and use the path displayed by Joomla.
 

 

If you see this appearing after posting a form:
 

Upgrade to the latest version (1.1.08 or above). The error occurs when you've implemented Joomla anti-spam security. One of these security measures intercepts any attempt to display a "raw" email address (i.e. This e-mail address is being protected from spambots. You need JavaScript enabled to view it. ) and converts it into a javascript representation. The simple email module does not allow <script> tags and accordingly displays the javascript code instead of the email address. Fixed in 1.1.08.

 

If you do not receive emails after posting the form:

 

The Simple Email Form module uses Joomla mail.  There are several reasons why you might not be receiving email after posting the form.  Please review these steps before asking me for help!!!

  • Check your Joomla configuration and make sure you're set up properly for mail
  • Does your server have "sendmail"?  If not, then PHP mail (and the module) will not work.
  • Are you running on a test server which is local?  Do you have a full Mail Transfer Agent installed (i.e. exim)? 
    -- If not, then your server cannot send mail, which means the module won't work.
  • Is your ISP blocking ports so that you are not able to send mail?  (Some of them do, trust me!!!) 
    -- If so, contact your ISP and resolve the situation
     

You can click here to download a tool email_test.zip.  Unzip the file somewhere off your document root and then run email_test.php.  It's a simple PHP email program which you can use to test to see if your server is able to send email from PHP.

 

If you have problems posting new articles after running the simple email form module:

 

Upgrade to version 1.1.09 or above.

The problem was due to a bug in earlier versions where the default date/timezone was set to a fixed locale.  This was fixed in 1.1.09 by eliminating the setting and using Joomla's built-in date API instead of using straight PHP function calls.

 

If after posting a form you see mangled text when using international character sets:

 

Symptom: after posting a form you see something like this: ��α�α� in the input fields.

Solution: Upgrade to 1.1.10 or above

Previous versions used 'htmlentities()' which does not have good support for multibyte character encodings.  1.1.10 switched to 'htmlspecialchars()' which has better support.

 

Version History

Version 1.7.07 -- 25 April 2012 

  • Fixed bug where email attachments are not sent unless something is entered into allowed extensions
    (thanks to Rob Smolenaars!)

Version 1.7.06 -- 20 April 2012 

  • Fixed bug where NULL replyTo generates an "Invalid Address" error (only visible in test mode)
    (thanks to Rob Smolenaars!)
  • Added anchor so when the form is submitted, the top of the screen resets to that anchor tag
    (thanks to Joanne Lewis!)
  • Added Czech translation thanks to Radek Žilka
  • Added option to disable "From" email checking

Version 1.7.05 -- 7 March 2012 

  • Fixed bug applicable affecting certain websites (i.e. PHP 5.3.x and also Joomla 2.5) where no emails are sent if CC and BCC fields are not filled in.  Thanks to Lulu Zhang for first spotting this problem!
  • Added "Test Mode" which does a dump of the mail object after sending.  Useful for testing and troubleshooting.

Version 1.7.04 -- 15 February 2012 

  • Fixed problem bug "Invalid address: Invalid address: Invalid address:"

Version 1.7.03 -- 7 February 2012 

  • Fixed problem "Undefined property: modSimpleEmailForm::$_rowClass in ... "

Version 1.7.02 -- 7 February 2012 

  • Change language option to type "list" (see http://docs.joomla.org/List_parameter_type)
  • Added optional Reply-To field
  • Modified To, CC, BCC to accept multiple values separated by commas or spaces

 Version 1.7.01 -- 19 December 2011 

  • If CSS class designated, creates xxx_table, xxx_row, xxx_th and xxx_td classes inside form.
  • Fixed problem with CAPTCHA library: added directory path variable and specified absolute path for require_once statements
  • Added check and only display error message row if there is a message
  • Fixed problem from htmlentities display of email address in "from" field: converted '&#64;' into '@'

 

Version 1.7.0 -- 25 November 2011

 

  • Converted to Joomla 1.7
  • Revised code to make it object oriented
  • Tested compatible with Joomla 1.6
  • Added Thai translation (thanks to Noona!!!)
  • Added redirect URL feature
  • Added space between labels and input fields
  • Added option to auto-reset fields (or not)

 

Version 1.1.12 -- 01 Sep 2011

 

  • Fixed bug in line 476 calling sendResults()

 

Version 1.1.11 -- 24 Aug 2011

 

  • Converted field display from htmlentities to htmlspecialchars
  • Fixed problem in the email received where field1 and field2 have the same label (of field2)
    Thanks to Rui Castro Lobo and "drunkenmanwalking" for spotting this bug!
  • Added an 'auto copy' option which sends a copy to user automatically
  • Added max length option to fields thanks to Rui Castro Lobo

 

Version 1.1.10 -- 24 May 2011

 

  • Fixed a bug whereby redisplaying input values in posted forms mangled multibyte character display.  Determined problem stemmed from limited support for international character sets in the PHP 'htmlentities()' function.  Switched to 'htmlspecialchars()'.  Thanks to Stamatis for both pointing out the problem as well as confirming that the fix worked.

 

Version 1.1.09 -- 31 Mar 2011

 

  • Added Hebrew translation thanks to Dror Lamdan

  • Added Turkish translation thanks to Nurettin Acar

  • Fixed bug where the simple email module sets the default date/timezone to a fixed locale potentially causing problems later when posting new articles, etc.  The solution was to replace  straight PHP date/time function calls with Joomla date API calls

 

 

 

Version 1.1.08 -- 31 Mar 2011

 

  • Added Russian translation thanks to Alex Breems

  • Fixed bug where the simple email module conflicts with certain Joomla anti-spam security measures. Certain security measures are designed to capture any attempt to display a "raw" email address, and convert it into a spambot unreadable form using javascript. The simple email module has its own security measures which absolutely prevent injecting javascript into any input field! A simple work around was arrived at whereby the email address is rendered as This e-mail address is being protected from spambots. You need JavaScript enabled to view it. instead of This e-mail address is being protected from spambots. You need JavaScript enabled to view it. .

  • "From" field now included in the body of the email message

 

Version 1.1.07 -- 28 Feb 2011

 

  • Added Danish translation thanks to Ernesto

  • Added Hungarian translation thanks to Polgar Istvan

 

Version 1.1.06 -- 14 Dec 2010

 

  • Added Polish translation -- thanks to Michał Przekopowski

  • Added German translation -- thanks to Uwe Stockinger

  • Added Greek translation -- thanks to Nasos Liagos

  • Fixed bug where a notice of an undefined index was returned + added default length and labels for optional fields 1 - 5

  • Fixed bug where fields 1 - 5 were not showing up

  • Fixed incompatibility with certain other Joomla modules due to language translation technique

 

Version 1.1.05 -- 13 Dec 2010

 

  • *** WITHDRAWN -- dont' use!!! ***

 

Version 1.1.04 -- 30 Oct 2010

 

  • Added Italian translation -- thanks to Cristian Lorenzini

 

 

 

Version 1.1.03 -- 19 Oct 2010

 

  • Added Estonian translation -- thanks to Lauri Liikane

 

 

 

Version 1.1.02 -- 28 Sep 2010

 

  • Body of email message now contains labels + user input data

 

 

 

Version 1.1.01 -- 15 Sep 2010

 

  • 6 language files are included: Dutch, English, French, Portugese (Brazilian), Spanish, and Swedish

 

 

 

Version 1.1.0 -- 1 Sep 2010

 

  • Improved language support using separate INI files
  • Language files included: English, Spanish, Swedish and Dutch
  • Captcha images are only deleted if more than 5 minutes old
  • Added ability to make fields 1 to 5 active, required (mandatory), or not active
  • There is a new "Allowed Filenames" field in the module configuration which lets you add a list of filename extensions separated by commas; leave blank for all
  • Added a "text" CAPTCHA for those having difficulty getting image CAPTCHAs configured properly
  • Added advanced diagnostics which give recommendations for image CAPTCHA settings in case of error
  • Added parameters which allow you to change the color of "success" or "failure" message instead of just HTML red or green
  • Error messages appear under the fields they are associated with

 

Version 1.0.8 EN / SE / ES

 

  • Fixed a bug with an improper number of parameters to rand()
  • Thanks to Muneca Osorio for the Spanish translation!

 

Version 1.0.7 EN and SE

 

  • Fixed bug where when CAPTCHA value was entered incorrectly all text after error message appeared in red
  • Aligned the "Copy Me" checkbox, and SUBMIT and RESET buttons, with the other input field
  • Set CAPTCHA to not cache by randomly generating a new filename for each new CAPTCHA

 

Version 1.0.6 EN and SE

 

  • Added PEAR5.php library file to fix the following error seen on Windows servers (thanks Edwin!):
    Warning: include_once(PEAR5.php) [function.include-once]: failed to open stream: No such file or directory in D:\Hosting\*******\html\joomla\modules\mod_simpleemailform\PEAR.php on line 766

    Warning: include_once() [function.include]: Failed opening 'PEAR5.php' for inclusion (include_path='.;C:\php5\pear') in D:\Hosting\*******\html\joomla\modules\mod_simpleemailform\PEAR.php on line 766

 

Version 1.0.5 EN and SE

 

  • Streamlined file attachment process
  • Got rid of "Upload" button -- no need for the extra step!

 

Version 1.0.4 EN and SE

 

  • Added "Send Copy to Me" field
  • Removed slashes in front of ' and " in text area
  • Added "Reset" button
  • Internal translation fields for buttons (thanks to Mat and Lars!)

 

Version 1.0.3

 

  • Improved internal language support
  • Modified CAPTCHA process
    • Adds prefix "captcha_"
    • Erases old CAPTCHA files
    • Now uses native Joomla JFile::write() instead if "file_put_contents()" to write

 

Version 1.0.2.se

 

  • Swedish translation of "front-end" strings
  • Adjusted date/timezone to "Europe/Stockholm"
  • Note: administrative back-end is still in English
  • Contributors:
    Lars Dahlberg
    Mats Arvendal

 

Version 1.0.2

 

  • Added left, right and center config option for labels (thanks to Mats for this suggestion)
  • Version 1.0.2.se is in Swedish (thanks to Lars Dahlberg!).

 

Version 1.0.1

 

  • Added ability to deactive file upload field

Subcategories