Great FormMail script. I'm trying to get it working with an .ini file but am having trouble. PHP version is 4.3.10 on a Windows shared server, FormMail v8.05.
Script works fine without the ini file, but plugging it in creates errors. My somewhat uninformed guess is a pathing problem to the ini file.
I inserted the line ini_set("sendmail_from","me@mysite.com"); near the beginning of the php file in order to get my server to send email. Seems to work okay with that. I don't know if I should be fooling around with INI_SET_FROM. All its ramifications and conditions make my head spin at first glance, but I'm sure I could wade through if necessary. That line seems to be getting me through as far as receiving basic form email without the ini file.
I'm using the supplied sampleform.htm for testing and only changing the "recipients" value as needed from an actual email address to a referenced alias in the ini file. A real address and not using the ini file comes through just fine, but upon referencing an alias, and creating and pathing an ini file I'm getting errors. Cutting out the ini file again restores success.
Attempting to use the ini file generates the following in the form:
It also generates a script error email with the following:An error occurred while processing the form .
Our staff have been alerted to the error .
We apologize for any inconvenience this error may have caused.
Your form submission was processed by (8.05)
My ini pathing line is: $Form_INI_FILE = "/www/forms/abc.ini"; with the original default line commented out.The following error occurred in FormMail:
no_valid_recipients
**********
Error=The form has an internal error - no valid recipients were specified
The ini file contains:
me@mysite.com matches $TARGET_EMAIL = array("^me@mysite\.com$"); and <input type="hidden" name="recipients" value="me" /> was substituted in the html file. With the ini file path enabled in the script and the alias inserted in the form I get the above errors.[email_addresses]
me = "me@mysite.com"
Setting define("DB_SEE_INI",true); I get the message:
My root files are in "www" on the shared server. I've tried many pathing variants, all with the same results:The following settings were found in the file '':
With script and ini in the root directory (/www/):
abc.ini
/www/abc.ini
www/abc.ini
/root/abc.ini
/html/abc.ini
../abc.ini
With script and ini in /forms/:
forms/abc.ini
/forms/abc.ini
www/forms/abc.ini
/www/forms/abc.ini
Also complete absolute path just for kicks:
http://www.mysite.com/abc.ini
I really don't like the idea of a live email floating about in a form, even with AT_MANGLE so I really need the ini file to work. I wish it could be hardcoded directly into the script and be done with it. I'm hoping someone has some ideas on what may be wrong. Maybe I've missed something stupid along the way.
Thanks in advance.


Reply With Quote
Bookmarks