the_0ne has asked for the wisdom of the Perl Monks concerning the following question:
That's not the full code, but the jist of the Net::SMTP code. The way I know that it fails over around 4000 chars is I have some code to split the $body into 3000 character strings with newlines at the end and that works fine. Now pretend that the $body var is at least 4500 characters. The mail will get stuck in the BADMAIL with this error...# Set the smtp variables. $server = "mysmtpserver"; $sender = "$userName\@mydomain.com"; $addr = "$userName\@mydomain.com"; $subject = $cgi->param('subject'); $body = $cgi->param('EmailBody'); $body =~ s/\r\n/\n/g; my $smtp = Net::SMTP->new($server); $smtp->mail($sender); $smtp->to($addr); $smtp->data(); $smtp->datasend("From: $sender\n"); $smtp->datasend("To: $addr\n"); $smtp->datasend("Subject: Status Report $subject_date\n"); $smtp->datasend("$body\n");
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Net::SMTP - Length limitation.
by mpolo (Chaplain) on May 16, 2001 at 10:34 UTC | |
by the_0ne (Pilgrim) on May 16, 2001 at 16:56 UTC | |
|
Re: Net::SMTP - Length limitation.
by eejack (Hermit) on May 16, 2001 at 07:43 UTC | |
by Banky (Acolyte) on May 16, 2001 at 09:37 UTC | |
by the_0ne (Pilgrim) on May 16, 2001 at 17:00 UTC | |
by the_0ne (Pilgrim) on May 16, 2001 at 08:15 UTC |