Hello, I have a perl script that looks at a users mailbox (var/spool/mail/USERNAME) and takes a message extracts the To, From, CC, BCC, Subject, and Message out and enters them as a comments in a database. The script looks for the email address in the To field by extracting everything between qoutes (" "). Which works great for email sent from Lotus Notes [4.6] as that is the format Notes uses. Unfortunatly, MS Outlook does not use quotes in that field. So all email sent from Outlook is ignored. What I am looking for is any help that will allow me to change the script to look for quotes OR anything after FROM: so that all email will be processed the same. I have included the section of script I am referring to at the bottom of this post. Thanks VERY much in advance for any and all help on this. It has been a huge source of frustration for me and the company I work for. TIA! -Jim ---Begin Code Section--- foreach(@mbox) { foreach(@$_) { if ($current_key eq "contents") { if ($_=~m"Content-Disposition: attachment") { $bad=1; } if (!$bad) { if (exists($message{$current_key})) { $message{$current_key}="$message{$current_key} $_"; } else { $message{$current_key}=$_; } } } else { @pieces=split(': ',$_,2); if ($pieces[1] ne "") { # Is this a unique entry or a continuation of the previous $current_key=$pieces[0]; if (($current_key eq "Content-Type") &#0124; &#0124; ($current_key eq "Content-Disposition") ) { $current_key="contents"; } chomp($pieces[1]); if (exists($message{$current_key})) { $message{$current_key} = "$message{$current_key} $pieces[1]"; } else { $message{$current_key}="$pieces[1]"; } } else { chomp($pieces[0]); if (($current_key eq "To")&#0124; &#0124;($current_key eq "cc")&#0124; &#0124;($current_key eq "Subject")) { $result=($pieces[0]=~s" ""g); } if (exists($message{$current_key})) { $message{$current_key} = "$message{$current_key} $pieces[0]"; } else { $message{$current_key}="$pieces[0]"; } } } }

# We need to remove the extraneous information from the addressing fields @tmp=split('"',$message{'From'}); $message{'From'}=$tmp[1];