[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [coldsync-hackers] I have problems with Mail.pm



> These lines are
>
>         $cc =~ s/\s*\n\s*(?!$)/, /gs;
>         $bcc =~ s/\s*\n\s*(?!$)/, /gs;
>         $replyTo =~ s/\s*\n\s*(?!$)/, /gs;
>         $sentTo =~ s/\s*\n\s*(?!$)/, /gs;
>
>
> I don't know what these lines are doing.

These lines are substituting trailing whitespace, then a newline, then more
whitespace, into a single comma.  This is for joining headers:

To: jim@myhouse.com, shawna@hishouse.com,
    mike@theirhouse.com

The above line has recipients on multiple lines but is valid,  The lines
above join them into a single line.  However, the error you're receiving sez
the fields are not defined.  If it was me, I'd patch the conduit like this:

$cc =~ s/\s*\n\s*(?!$)/, /gs if $cc;
$bcc =~ s/\s*\n\s*(?!$)/, /gs if $bcc;
$replyTo =~ s/\s*\n\s*(?!$)/, /gs if $replyTo;
$sentTo =~ s/\s*\n\s*(?!$)/, /gs if $sentTo;

> Should I be sending something other than null (ie
> $record->{to}='';) values to these fields?

Only if you need those headers defined in the email message(s).

L8r,
Rob

#!/usr/bin/perl -w
use Disclaimer qw/:standard/;



-- 
This message was sent through the coldsync-hackers mailing list.  To remove
yourself from this mailing list, send a message to majordomo@thedotin.net
with the words "unsubscribe coldsync-hackers" in the message body.  For more
information on Coldsync, send mail to coldsync-hackers-owner@thedotin.net.