Click to See Complete Forum and Search --> : multiple recipients in formmail???
jm_0812
02-12-2004, 07:19 PM
someone please help me......after all i know about mattsformmail, which isn't much......I can't seem to make a list or bullets replace the recipient field....ne idea how to have a dynamic field that is for the recipient field?????
Jeff Mott
02-13-2004, 04:01 PM
I believe you can seperate multiple addresses with a semi-colon (e.g., john@doe.org; jane@doe.org).
Note also that Matt's scripts are generally not recommended in the CGI community and you may want to seek an alternative.
jm_0812
02-13-2004, 05:59 PM
well what i am more looking for is, a menu or a bullet cluster, so that the end user can choose who they want to be the email recipient....ie: sales, or customer service, or product info....thank you ahead of time
Jason
Jeff Mott
02-13-2004, 07:13 PM
Have your HTML form send the value according to what they choose (i.e., sales, customer services, etc.). Then in the Perl script say something such asif ($FORM{SendTo} eq 'sales') {
$recipient = 'sales@website.com';
} elsif ($FORM{SendTo} eq 'customer-service') {
$recipient = 'service@website.com';
}
etc.
jm_0812
02-16-2004, 10:59 AM
well that looks like a good way to go....I don't believe that I have enough knowledge of Perl to write custom code...lol......but thanx neways
Jason
ziffgone
02-16-2004, 08:49 PM
Don't know if I'm following this correctly, but if I get the gist of what you want, you should be able to simply turn your "recipient" Text input into a Select input:
instead of using:
<input type="text" name="recipient" size="30">
Use the Select form function:
<select name="recipient">
<option value="sales@yourdomain.com">Sales
<option value="service@yourdomain.com">Customer Service
<option value="info@yourdomain.com">Product Info
</select>
To see it in action, Click Here (http://ziffgone.the.cashculture.net/example/selectorex.htm).
I think this'll do what you wish easily.
Regards...
jm_0812
02-16-2004, 09:16 PM
yes this looks exactly what I am looking for....I think this is what I have done, well kind of. I am using a list for the different recipient's, and the name of the field is recipient. But, the form keeps kicking back no recipient error. So, is there a way around this? I was thinking of having a hidden field with the recipient value = that of the user input selelction, but I am unsure of how to, if it's even possible? any hints??
thank you all for your help, I am learning with every hint.
Jason
p.s. any questions about animation or Lightwave specifically, I would be more than happy to help...but not likely seeing how this is a webdeveloper forum....
Jeff Mott
02-16-2004, 09:26 PM
<select name="recipient">
<option value="sales@yourdomain.com">Sales
<option value="service@yourdomain.com">Customer Service
<option value="info@yourdomain.com">Product Info
</select>This is a bad way of doing it, however. Since this now allows the user to send messages to any e-mail address they choose, effectively turning the page into an outlet for spammers.
jm_0812
02-16-2004, 09:40 PM
well that is no good....last thing I want to do is introduce more problems into the mix...other than rewriting the CGI script, what would you suggest?
Jeff Mott
02-16-2004, 11:05 PM
I'm afraid my first recommendation was about it. :(
Though, if you want to become more familiar with Perl/CGI programming, you can take a loot at Beginning Perl (http://learn.perl.org/library/beginning_perl/).
jm_0812
02-18-2004, 07:21 PM
alright well...I guess, I got some learning to do, thank you much...I am sure to check that out.
Thank you once again,
Jason
ziffgone
02-18-2004, 10:34 PM
Actually Jason, there is an alternative FormMail that was created as a drop-in replacement for Matts FormMail and it'll do exactly what you are looking for. It does the same thing as Matt's but has many extra mailing and security features.
One of those features allows you to set up "recipient aliases". This allows you to set up numerous emails within the CGI script itself that the script allows mailing to. Such as:
%recipient_alias = (
'1' => 'sales@yourdomain.com',
'2' => 'service@yourdomain.com',
'3' => 'info@yourdomain.com',
);
This allows you to create a form input simply using the alias numeral. Example:
<input type="hidden" name="recipient" value="2" >
With this system you can use the above selector I mentioned ealier with this script and not have to fear Spammers. Example:
<select name="recipient">
<option value="1">Sales
<option value="2">Customer Service
<option value="3">Product Info
</select>
The script also allows you to set up the "Allowed" recipients so the script cannot be used to mail to more people than the number you set. It also has the feature to set "Allow_mail_to" addresses where you can define which addresses the script can mail to.
The script is free, provided by the good people at http://nms-cgi.sourceforge.net
The actual script can be found here: http://nms-cgi.sourceforge.net/scripts.shtml
You can simply configure it, drop it onto your server in the place of Matt's FormMail. Simple as that. I believe it is an excellent script that should provide for your needs.
Regards...
jm_0812
02-18-2004, 10:55 PM
wow... that looks excellent, I have been thinking about going with an alternative to Matt's but was unsure about what to use. I will be sure to check it out.
Thank you,
Jason