View Full Version : recipients error
mike.2004
30-Mar-2004, 03:01 PM
this is the test link http://www.mike-hobbs.co.uk/sampleform.html I keep getting the The form has an internal error - no valid recipients were specified.
I have att a copy of the php and form please help I am sure it is nothing major
thanks in advance
Mike
russellr
30-Mar-2004, 07:33 PM
Hi Mike,
You're very close to getting this right.
In formmail.php, you have:
$TARGET_EMAIL = array(EMAIL_NAME."^mail*&*mike-hobbs\.co.uk$");
This needs to be a real email address, not the mangled one. Also, the "^" at the beginning is only used if you're not matching other names (i.e. you need to remove the EMAIL_NAME component).
The following should work for you:
$TARGET_EMAIL = array("^mail@mike-hobbs\.co\.uk$");
OR
$TARGET_EMAIL = array(EMAIL_NAME."@mike-hobbs\.co\.uk$");
Try that and let me know how you progress.
mike.2004
30-Mar-2004, 11:18 PM
Hi Mike,
You're very close to getting this right.
In formmail.php, you have:
$TARGET_EMAIL = array(EMAIL_NAME."^mail*&*mike-hobbs\.co.uk$");
This needs to be a real email address, not the mangled one. Also, the "^" at the beginning is only used if you're not matching other names (i.e. you need to remove the EMAIL_NAME component).
The following should work for you:
$TARGET_EMAIL = array("^mail@mike-hobbs\.co\.uk$");
OR
$TARGET_EMAIL = array(EMAIL_NAME."@mike-hobbs\.co\.uk$");
Try that and let me know how you progress.
Hey thanks for that now it works a treat.
I have a few more questions
can you run more than one form from this just by editing the form ?
if I edit the forms name do I need to edit anything with the php or is it all sorted unless I change server
thanks
Mike
russellr
30-Mar-2004, 11:36 PM
Great!
can you run more than one form from this just by editing the form ?
Yes, you can use the one formmail.php installation with as many forms as you like.
By setting the $TARGET_EMAIL values correctly, each form can send to a different set of recipients.
if I edit the forms name do I need to edit anything with the php or is it all sorted unless I change server
Except for the special fields in the form (recipients, subject, email, realname) and the configuration values in formmail.php ($TARGET_EMAIL, $AT_MANGLE, etc.), the forms and formmail.php are completely independent.
So, yes, you can change whatever you want in the form, including it's name.
Powered by vBulletin® Version 4.1.4 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.