Multiple email recipients using NMS Formail

A

Adam

Hi,

I am using Version 3.12c1 of NMS FormMail.

I am unable to get the script to post to mulitple email accounts.
The mail will only get sent to the first email account
in the '@allow_mail_to' array.

How can I have the mail forward on to multiple accounts ?

The script is standard apart from some formatting changes to the
generated html.

[snip]
$max_recipients = 5;
$mailprog = '/usr/lib/sendmail -oi -t';
$postmaster = '';
@referers = qw(mydomain.com);
@allow_mail_to = qw([email protected] (e-mail address removed));
@recipients = ();

[snip]

The init_allowed_address_list function is unchanged.

[snip]

sub init_allowed_address_list {
my ($self) = @_;

my @allow_mail = ();
my @allow_domain = ();

foreach my $m (@{ $self->{CFG}{allow_mail_to} }) {
if ($m =~ /\@/) {
push @allow_mail, $m;
}
else {
push @allow_domain, $m;
}
}

my @alias_targets = split /\s*,\s*/, join ',', values %{
$self->{CFG}{recipient_alias} };
push @allow_mail, grep /\@/, @alias_targets;

# The username part of email addresses should be case sensitive, but
the
# domain name part should not. Map all domain names to lower case
for
# comparison.
my (%allow_mail, %allow_domain);
foreach my $m (@allow_mail) {
$m =~ /^([^@]+)\@([^@]+)$/ or die "internal failure [$m]";
$m = $1 . '@' . lc $2;
$allow_mail{$m} = 1;
}
foreach my $m (@allow_domain) {
$m = lc $m;
$allow_domain{$m} = 1;
}

$self->{Allow_Mail} = \%allow_mail;
$self->{Allow_Domain} = \%allow_domain;
}

[snip]

Thanks in advance,
Adam
 
G

Gunnar Hjalmarsson

Adam said:
I am using Version 3.12c1 of NMS FormMail.

I am unable to get the script to post to mulitple email accounts.

Doesn't the documentation explain how you do that?
The mail will only get sent to the first email account
in the '@allow_mail_to' array.

How can I have the mail forward on to multiple accounts ?

The script is standard apart from some formatting changes to the
generated html.

[snip]
$max_recipients = 5;
$mailprog = '/usr/lib/sendmail -oi -t';
$postmaster = '';
@referers = qw(mydomain.com);
@allow_mail_to = qw([email protected] (e-mail address removed));
@recipients = ();

What's the purpose of the @recipients array?

Note that this group is not the right place to seek help with
configuring a script. If the docs isn't sufficient, asking the authors
is the natural next step.
 
J

Jonathan Stowe

Gunnar Hjalmarsson said:
Note that this group is not the right place to seek help with
configuring a script. If the docs isn't sufficient,

The EXAMPLES file has a section entitled:

EXAMPLE 3: Copies to multiple recipients

which explains how to do this.
asking the authors
is the natural next step.

The appropriate place to get support for any NMS programs is at the
mailling list at:

(e-mail address removed)

/J\
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top