Click to See Complete Forum and Search --> : Formmail.pl Variable Recipients???


axanthus
08-07-2006, 01:19 AM
Hello all. I have a question about formmail.pl and variable recipients. I'd like to use the script on an auto classified website so that potential buyers can email sellers via a form. Each seller has an email address associated with their account, which can be placed in the auto listing page via a placeholder, $user_name$. So, I configured the recipient field as follows:

<input type=hidden name="recipient" value="$user_name$">

It parses the email address nicely; however, the problem is that since each seller has a different email address/domain, the @recipient variable in formmail.pl will not allow an email to be sent.

I guess my question should be does anyone know how to configure formmail.pl to allow an email to be sent to any email address/domain, without it first having to be defined in @referers? Or, does anyone know of another cgi script that would work for this purpose?

Thanks!
Jessica

axanthus
08-07-2006, 08:49 PM
nevermind...figured it out.

kandiyohiv
08-15-2006, 09:56 PM
Mind sharing your solution? I have the same problem (well, similar).

My email addresses that I want to send the results to are stored in a database. So I'll query the database on the form page, throw them into one long comma delimited string and put that as the value for the form input 'recipient'. But I don't know how to set up the .pl @recipients to dynamically contain the domains of those email addresses.

Sounds similar to what you're trying to do. Or maybe the same solution at least...

axanthus
08-15-2006, 11:15 PM
I switched to anymail.cgi (http://cgi.veinotte.com/anymail.htm). With this script, you can choose not to define the domain names allowed as a recipient, which allows any email address to be used as a recipient. It also has @ character replacement, which prevents actual email addresses from displaying in your source code, and helps cut down on email harvesting.