Click to See Complete Forum and Search --> : Sending Multiple Emails


john noble
03-25-2005, 01:15 PM
Forgive for also posting this message in the Perl forum but I am not sure where my proble lies.

I am having a problem in sending multiple emails. I am using the formmail.pl from scriptarchive.com. For some reason it is only sending to the first recipient in the form hidden control 'recipient'.

Here is the code in the form
<td><input type='hidden' name="recipient" value="johnpn@hotmail.com, abolla@lycos.co.uk, johnpn@nor-tech.co.uk"/></td>


Here is a relevent snippet from the formmail.pl
@referers = ('outpost57.com', 'hotmail.com', 'nor-tech.co.uk', 'lycos.co.uk');

# @recipients defines the e-mail addresses or domain names that e-mail can #
# be sent to. This must be filled in correctly to prevent SPAM and allow #
# valid addresses to receive e-mail. Read the documentation to find out how #
# this variable works!!! It is EXTREMELY IMPORTANT. #
@recipients = &fill_recipients(@referers, '^abolla\@lycos\.co\.uk', '^johnnoble202\@hotmail\.com', '^john\@nor-tech\.co\.uk');

Can anyone see what the problem might be?

John

the tree
03-25-2005, 01:22 PM
Rather than doing this with a hidden input, I think you'd do better to just keep the recipitents in the perl script. It'd a be a lot neater for a start.

Compguy Pete
03-25-2005, 10:50 PM
simpler yet... why not just use the one email address option that you know works and setup an email forward on that address.

I can setup an address using a forward and it can then forward to as many different addresses I need.