Hi folks,
Nice work on og2list. I'm using it on http://sany-ip.eu for internal communication, and we had to fix a couple of bugs. The last one I just encountered concernes the "From:" header parsing in mail-in.pl script, somewhere around line 320. Here is the new code:
($from_name, $from_address) =
($head->get("From",0) =~ /^\s*(.*?)\s*<?(\S+?\@\S+?)>?\s*$/);
if (!$from_name) {
($from_name) = ($from_address =~ /^(.*)\@.*$/);
$from_name =~ s/[\.\_\-]/ /;
}
($to_name, $to_address) =
($head->get("To",0) =~ /^\s*(.*?)\s*<?(\S+?\@\S+?)>?\s*$/);
I needed to change the regexp because one of the partners uses Lotus notes, and sends headers of the form "From: name@domain".
Hope this helps.
kindest regards
Denis
Comments
Comment #1
Amazon commentedDenis, it is preferred is you follow these guidelines when posting improvements.
http://drupal.org/diffandpatch
Thanks for your contribution.
Kieran
Comment #2
killes@www.drop.org commentedDenno, can you please post the From: header of that mail exactly as it was in the mail? (of coure replace name and address)
Comment #3
gerhard killesreiter commented