Hi,
Post your form code (or a link to the form page), as well as your configuration section from the script.
ginger
Welcome to the Tectite Forums! You can download and get support for our free PHP FormMail (form processor) and other free software.
Hi.
I know there are other posts about this but none solve my problem.
I receive 2 error emails:
andCode:The following error occurred in FormMail : no_valid_recipients ********** Error=The form has an internal error - no valid recipients were specified.
I have checked $TARGET_EMAIL and its set correctly. I even used the sampleform and the configuration wizard and still get the errors. I'm wondering if there is anything server side that is causing the problems.Code:The following error occurred in FormMail : Unable to create check file "/tmp/fme60205.txt": fopen(/tmp/fme60205.txt) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: No such file or directory
Any ideas?
Cheers
m
Hi,
Post your form code (or a link to the form page), as well as your configuration section from the script.
ginger
HTML Code:<!-- STEP 1: Put the full URL to formmail.php on your website in the 'action' value. --> <form method="post" action="http://www.reddonkey.co.uk/phpmailer.php" name="SampleForm"> <input type="hidden" name="env_report" value="REMOTE_HOST,REMOTE_ADDR,HTTP_USER_AGENT,AUTH_TYPE,REMOTE_USER"> <!-- STEP 2: Put your email address in the 'recipients' value. Note that you also have to allow this email address in the $TARGET_EMAIL setting within formmail.php! --> <input type="hidden" name="recipients" value="michael@reddonkey.co.uk" /> <!-- STEP 3: Specify required fields in the 'required' value --> <input type="hidden" name="required" value="email:Your email address,realname:Your name" /> <!-- STEP 4: Put your subject line in the 'subject' value. --> <input type="hidden" name="subject" value="Sample FormMail Testing" /> <table border="1" cellspacing="5%"> <tr> <td> <p>Please enter your name:</p> </td> <td><input type="text" name="realname" /> </td> </tr> <tr> <td> <p>Please enter your email address:</p> </td> <td><input type="text" name="email" /> </td> </tr> <tr> <td><p>May we contact you?</p> </td> <td> Yes <input type="radio" name="contact" value="Y" checked /> No <input type="radio" name="contact" value="N" /> </td> </tr> <tr> <td><p>What are your favourite colours?</p> </td> <td> Red <input type="checkbox" name="colors[]" value="red" /> Blue <input type="checkbox" name="colors[]" value="blue" /> Yellow <input type="checkbox" name="colors[]" value="yellow" /> </td> </tr> <tr> <td valign="top"><p>What vehicles do you have a license to operate?</p> </td> <td valign="top"> <select name="vehicles[]" multiple size="5"> <option value="Car">Car</option> <option value="Bus">Bus</option> <option value="Truck">Truck</option> <option value="Plane">Aeroplane</option> <option value="Boat">Boat</option> </select> (Select all that apply; use CTRL-click to select) </td> </tr> <tr> <td valign="top"> <p>Please enter your message:</p> </td> <td><textarea name="mesg" rows="10" cols="50"></textarea> </td> </tr> <tr> <td><input type="submit" value="Submit" /></td> <td></td> </tr> </table> </form>PHP Code:/* Help: http://www.tectite.com/fmdoc/email_name.php */
define("EMAIL_NAME","^[-a-z0-9.]+"); // the '^' is an important security feature!
/* Help: http://www.tectite.com/fmdoc/target_email.php */
$TARGET_EMAIL = array("^enquiries@reddonkey\.co\.uk$");
/* Help: http://www.tectite.com/fmdoc/def_alert.php */
define("DEF_ALERT","michael@reddonkey.co.uk");
/* Help: http://www.tectite.com/fmdoc/set_real_document_root.php */
$SET_REAL_DOCUMENT_ROOT = ""; // overrides the value set by SetRealDocumentRoot function
Hi,
$TARGET_EMAIL is your problem. You've set the recipient to "michael" at your domain ... in the form. (You should remove actual email addresses from this post.) But in $TARGET_EMAIL you've set it to allow mail to "enquiries" ... at your domain.
The other error message is one that's documented in the FAQ here:
http://tectite.com/vbforums/faq.php?...faq_check_file
The script is trying to create a file to check for newer versions of formmail, but it's either not finding the file or unable to create it.
You can either create your own "scratch pad" directory as described on the page in the link above, OR you can just remove that check for a newer version of formmail by setting $CHECK_FOR_NEW_VERSION to false. That will eliminate that error message, but the script will no longer alert you to newer versions of the script when they're available.
ginger
Thanks for that. It seems to have sorted one of my forms out.
I checked my other forms as you described but when i click 'send' i get this error:
contacterror.html is my page to display errors. It doesn't even seem to find it. I get no error emails either.HTML Code:Cannot open template 'http://www.sbdevelopments.com/fmtemplates/contacterror.html? USER_AGENT=Mozilla%2F5.0+%28Macintosh%3B+U%3B+Intel+Mac+OS+X +10_5_4%3B+en-us%29+AppleWebKit%2F525.18+%28KHTML%2C+like+Gecko%29+Version %2F3.1.2+Safari%2F525.20.1&sessid=p5pahbrfjt59r1tuvfht3381v2&': fopen(http://www.sbdevelopments.com/fmtemplates/contacterror.html? USER_AGENT=Mozilla%2F5.0+%28Macintosh%3B+U%3B+Intel+Mac+OS+X +10_5_4%3B+en- us%29+AppleWebKit%2F525.18+%28KHTML%2C+like+Gecko%29+Version %2F3.1.2+Safari%2F525.20.1&sessid=p5pahbrfjt59r1tuvfht3381v2&) [function.fopen]: failed to open stream: no suitable wrapper could be found
My PHP mailer code and form scripts are below.
Anything that could cause the problem?
Thanks
PHP Code:/* Help: http://www.tectite.com/fmdoc/email_name.php */
define("EMAIL_NAME","^[-a-z0-9.]+"); // the '^' is an important security feature!
/* Help: http://www.tectite.com/fmdoc/target_email.php */
$TARGET_EMAIL = array("^myname@sbdevelopments\.com$");
/* Help: http://www.tectite.com/fmdoc/def_alert.php */
define("DEF_ALERT","myname@sbdevelopments.com");
/* Help: http://www.tectite.com/fmdoc/set_real_document_root.php */
$SET_REAL_DOCUMENT_ROOT = ""; // overrides the value set by SetRealDocumentRoot function
//
// override $REAL_DOCUMENT_ROOT from the $SET_REAL_DOCUMENT_ROOT value (if any)
// Do not alter the following code (next 3 lines)!
HTML Code:<form method="post" action="http://www.sbdevelopments.com/phpmailer.php"> <label for="name">Name</label> <div class="input-bg"> <input type="text" name="realname" id="name" /> </div> <label for="email">Email</label> <div class="input-bg"> <input type="text" name="email" id="email" /> </div> <label for="message">Your Message</label> <textarea name="mesg" id="message" onfocus="this.value=''; this.onfocus=null; setbg('#e5fff3');" onblur="setbg('white')"/></textarea> <p>We will not share any of your information with anyone.</p> <div id="formsend"> <input type="hidden" name="recipients" value="mynameGHSR64Hsbdevelopments.com"> <input type="hidden" name="good_url" value="http://www.sbdevelopments.com/thanks.php" /> <input type="hidden" name="bad_url" value="http://www.sbdevelopments.com/fmbadhandler.php" /> <input type="hidden" name="this_form" value="http://www.sbdevelopments.com" /> <input type="hidden" name="bad_template" value="contacterror.html" /> <input type="hidden" name="mail_options"value="HTMLTemplate=fmtemplates/contacttemplate.html" /> <input type="hidden" name="subject" value="Enquiry form"> <input class="submit-btn" name="submit" type="image" src="images/send_button.jpg" alt="submit" value="submit" /> </div> <div class="clear"></div> </form>
In your form it should just be:
Have you defined $TEMPLATEURL or $TEMPLATEDIR in the script? If so, please post what you have there.Code:<input type="hidden" name="mail_options" value="HTMLTemplate=contacttemplate.html" />
ginger
Note: I also added a space right after "mail_options". You had "mail_options"value= ...
Last edited by ginger23; 21-Jul-2008 at 07:26 PM. Reason: Note about space right before "value" in mail_options.
Okay, i've made the change to that line.
In the fmbadhandler script, i have:
$TEMPLATEURL = "http://www.sbdevelopments.com/fmtemplates";
Same line also in my main mailer script too.
It shouldn't even be sending me to the contacterror.htm as there are no errors when filling the form out!
Ta
Last edited by mfos; 21-Jul-2008 at 07:34 PM.
In some cases you need to set $TEMPLATEDIR instead of $TEMPLATEURL (has to do with a problem with your host not allowing url's to be opened using PHP's "fopen" function). You'll need the server path for your hosting account. You can get that using http://yourdomain.com/your-script-name.php?testalert=1.
That will give you the server path to your document root. From there you'll need to add fmtemplates to the rest of the path for $TEMPLATEDIR.
ginger
Also, for the this_form setting, you specified the home page, rather than the page that contains the form.
ginger
Okay we are getting close.
I now get the error page which is good, in a way.
I have set errors for <fmfullerror/> on my error page and it says that I need to complete all fields, which I did do on the form. Why is it giving me errors?
Any ideas?
Cheers for your help.
HTML Code:<form method="post" action="http://www.sbdevelopments.com/phpmailer.php"> <label for="name">Name</label> <div class="input-bg"> <input type="text" name="realname" id="name" /> </div> <label for="email">Email</label> <div class="input-bg"> <input type="text" name="email" id="email" /> </div> <label for="message">Your Message</label> <textarea name="mesg" id="message" onfocus="this.value=''; this.onfocus=null; setbg('#e5fff3');" onblur="setbg('white')"/></textarea> <p>We will not share any of your information with anyone.</p> <div id="formsend"> <input type="hidden" name="recipients" value="enquiriesGHSR64Hsbdevelopments.com"> <input type="hidden" name="good_url" value="http://www.sbdevelopments.com/thanks.php" /> <input type="hidden" name="bad_url" value="http://www.sbdevelopments.com/fmbadhandler.php" /> <input type="hidden" name="this_form" value="http://www.sbdevelopments.com/contact.php" /> <input type="hidden" name="bad_template" value="contacterror.html" /> <input type="hidden" name="mail_options" value="HTMLTemplate=contacttemplate.html" /> <input type="hidden" name="subject" value="Enquiry form"> <input class="submit-btn" name="submit" type="image" src="images/send_button.jpg" alt="submit" value="submit" /> </div> <div class="clear"></div> </form>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks