first, don't use a URL for ur INI file path
use a filesystem path - use the "testalert" test to help find the right path
second, check that the file is readable by "everyone" - rw-r--r--
Welcome to the Tectite Forums! You can download and get support for our free PHP FormMail (form processor) and other free software.
Hi,
I have followed the How To Guides read all the documentation but to no avail I can't seem to get an .ini file to work. I constantly get an error message stating "The following error occurred in FormMail: bad_ini" It then states "Error=The FormMail INI file"http://mysite.org/folder/file.ini" has a syntax error"
I've been at this for three days and no matter what I do I can't get this to work.
The file.ini looks like this
[email_addresses]
chelp="cubhelp@mysite.org"
I have no clue what is wrong. Can someone help?
first, don't use a URL for ur INI file path
use a filesystem path - use the "testalert" test to help find the right path
second, check that the file is readable by "everyone" - rw-r--r--
Crabtree,
You were spot on, the INI file works now.
I do have one issue that isn't working though. I'm using an alias in the command
<input type="hidden" name="email" value="alias" />
trying to display a 'From' email address to the recipients. But when I use the 'alias' the from email address in my email is displayed as "alias@webhostingcompany.com" but if I use any email address in the form of "me@anydomain.com" the 'From' field in the recipients emails displays as "me@anydomain.com". So in other words a "Alias" will not work when used in <input type="hidden" name="email" value="alias" />
The INI file is
[email_addresses]
alias="me@anydomain.com"
Can anyone explain what is happening or am I trying to do something that isn't possible?
Thanks in advance!!!!
DLR
so, the "email" field is supposed to be input from the form - it's the address of the person filling in the form
the "recipients" is u - the owner of the form
it makes no sense to set the "email" field to anything other than an input on the form.
sometimes email servers refuse to send email from outside ur domain - in this case u can tell formmail to set the from address using a "mail_options" feature called "FromAddr". Do that if u need to, but don't try to set the "email" field.
Crabtree,
I did as you said and again you're the man, works like a champ!!! Before you helped me get the INI file to work I tried to use "FromAddr" and it only worked for the error reporting emails to me via DEF_ALERT and not for recipients of a successful form. But all is well now and I hope it stays that way!!
Thanks again Crabtree!!
DLR
How do I find instructions as to "How to make and ini file"
I have the formmail working on my site but I would like to be able to totally hid my email address.
Can anyone point me in the right direction
Maggie
PS I am totally new to php so please be gentle.
http://www.tectite.com/fmhowto/inifile.php
it's just a text file, so just use a simple editor like Windows Notepad
Hi Crabtree,
So it doesn't have any prefixes, just a plain txt doc
so if I want to have my email address in the ini file to keep it off the hmtl I would have the following in the ini file
[email_addresses]
me = "maggie@........co.uk"
would this be saved as ini.txt ?
and change <input type="hidden" name="recipients" value="me" /> instead of <input type="hidden" name="recipients" value="maggie@...........co.uk" />
and then add $FORM_INI_FILE = "/path/to/formmail.ini";
Not sure of this bit formmail.ini
Do I need to save the file as formmail.ini?
Or is it saying formmail look at ini so it my formmail is called say formammail2 I would need to write formmails.ini
Thanks For you help
Maggie
call the file anything u want, but "formmail.ini" is a good startso if I want to have my email address in the ini file to keep it off the hmtl I would have the following in the ini file
[email_addresses]
me = "maggie@........co.uk"
would this be saved as ini.txt ?
yes.and change <input type="hidden" name="recipients" value="me" /> instead of <input type="hidden" name="recipients" value="maggie@...........co.uk" />
this is where u tell formmail to find ur ini file (/path/to) and what it's called (formmail.ini)and then add $FORM_INI_FILE = "/path/to/formmail.ini";
Not sure of this bit formmail.ini
Do I need to save the file as formmail.ini?
Or is it saying formmail look at ini so it my formmail is called say formammail2 I would need to write formmails.ini
Thanks
I will give that ago
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks