Hi Max,
I am no formmail 'expert', but I'll have a go! Firstly I have never used the ini_set function in formmail. As all my forms collect the email address of the sender, mine automatically defaults to their email address. That way when you get the email you can hit reply and their email is auto populated in the to field..... but any hoo I'm off the subject of your ini file.
I see you have set your $TARGET_EMAIL file and looks ok. VERY important to remember to do this for every alias address you want in your ini file. I've endured many hours of frustration testing forms when I started using formmail by simply forgetting to add my address here too. Forgetting this also gives you the same no_valid_recipients error even if your ini is set up correctly.
Where I think you problem is is the path to your ini file. Depending on your web host and how your site is set up, the path can be very different from what you actually think. The $FROM_INI_FILE needs to be the full pathname from the ROOT.
Like you I origianally thought (and using your example), well that must be /www/forms/abc.ini.
But no...my hosting service's set up means that my path is actually /var/virtual/web/w6529/html/abc.ini
You can usually find out the true Root Directory (and path) of where your formmail script is and use it as a basis. This can be done by putting the following into your web browser (use the proper address for where ever you have your form mail script living.
http://www.mysite.com.au/formmail.php?testalert1
It will then send you an email showing the real path to your ROOT directory and therefore the path you should include in your $FROM_INI_FILE.
For added security I ALWAYS put my ini files and templates in a folder on my server that people won't see in the URL address bar of their web browser..... e.g. rather than using the directory forms you might want to use a folder say, all hidden stuff.
for example my $FORM_INI_FILE looks like this:
/var/virtual/web/w6529/subdomain/testingsite/all hidden stuff/postoffice.ini
I really hope this helps! If not post me back.


Reply With Quote
Bookmarks