Gossamer Forum
Home : Products : Gossamer List : Discussion :

Undeliverable mail if commas in subscriber's name

Quote Reply
Undeliverable mail if commas in subscriber's name
Just ran across this bug.....if someone subscribes to a list and the NAME provided contains a comma, the job gets messed up...not fatally though. It appears that GList tries to send it to multiple people:

NAME: Smith, John, Jr

It tries to mail SMITH (it looses the actual email address) and JOHN (also, no actual address), BUT it does send the mailer to JR at the actual email address.

Can this be fixed in the code? Or do I just have to post "Don't use COMMAS (,) in your name" kind of directions.

Any idea if any other punctuation might do this?

Thanks!

Dave

Last edited by:

bretzke: Apr 21, 2005, 10:21 AM
Quote Reply
Re: [bretzke] Undeliverable mail if commas in subscriber's name In reply to
Can you make some changes in Mailer.pm around line #687:

Code:
.....
my %head;
my $to_quoted = "$m->{eml_name} ";
my $from_quoted = "$info->{mli_name} ";
if ($to_quoted =~ /[^\w\s]/) {
$to_quoted =~ s/([\\"])/\\$1/g;
$to_quoted = '"' . substr($to_quoted, 0, -1) . '" ';
}
if ($from_quoted =~ /[^\w\s]/) {
$from_quoted =~ s/([\\"])/\\$1/g;
$from_quoted = '"' . substr($from_quoted, 0, -1) . '" ';
}
$head{from} = $info->{mli_name} ? $from_quoted . "<$info->{mli_from}>" : $info->{mli_from};
$head{to} = $m->{eml_name} ? $to_quoted . "<$m->{eml_email}>" : $m->{eml_email};
$head{subject} = $info->{mli_subject};
....

Hope that helps.

TheStone.

B.

Last edited by:

TheStone: Apr 5, 2005, 4:35 PM
Quote Reply
Re: [TheStone] Undeliverable mail if commas in subscriber's name In reply to
I made the change to Mailer.pm....do I need to restart modperl to make this take effect? I tried a quick test and didn't see any change in function.

Thanks!

Dave

Last edited by:

bretzke: Apr 21, 2005, 10:22 AM
Quote Reply
Re: [bretzke] Undeliverable mail if commas in subscriber's name In reply to
Yes, you have to if it's under modperl.

TheStone.

B.