CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Beginner:
sending to multiple email addresses



May 2, 2000, 5:39 AM

Post #1 of 2 (834 views)
sending to multiple email addresses Can't Post

I'm using sendmail and can send to an individual address but I need to send to a group of multiple addresses. Like:,,

What is the syntax for this? Is it possible?

Thanks in advance


May 3, 2000, 9:47 AM

Post #2 of 2 (834 views)
Re: sending to multiple email addresses [In reply to] Can't Post

I'm sure it's possible, and I'll take a stab at the syntax.

if all of the addresses are in a data base the I would try this if the data is close to this;|perlkid||cure|
## first field email second name


open(email, "</home/html/database/email.db");
foreach $line (@all)
@fields = split(/\|/, $line);
$theirname = ucfirst($fields[1]);
$mailto = "$fields[0]";
open (MAIL, "| $mailprog -t -oi") &#0124; &#0124; die "Can't open $mailprog";
print MAIL "To: $mailto\n";
print MAIL "From: $yourmail\n";
print MAIL "Subject:Testing\n";
print MAIL "Welcome to this mailing list.\n";

The mail code may be a little off but it's just to give you an idea. Hope that works. Make sure to close the fields in the data base with a pipe or the code won't work.



Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives