Gossamer Forum
Home : Products : Gossamer Mail : Discussion :

footer wraps, body doesn't

Quote Reply
footer wraps, body doesn't
On changing the compose options line wrap settings to say xx, the footer (as set by admin) wraps at xx but the body doesn't.

Also, when Msg Source Is Seen in View header, there are '=' appearing in the body but footer is wrapping fine. The same is observed in all cases of mails sent from GM.

sample:

body:

(from freemail-gt to gm account)
Send a message to xxxxxx@yyyyyyy.net from one of the extenal account so I c=
an see if it does the same thing. Send a message to xxxxxx@yyyyyyy.net from=
one of the extenal account so I can see if it does the same thing.=20

(from GM to GM ... line wrap set at 55)

Send a message to xxxxxx@yyyyyyy.net from one of the external account so I =
can see if it does the same thing.

Send a message to xxxxxx@yyyyyyy.net from one of the external account so I =
can see if it does the same thing.

The footer in this case wraps perfect as show below
_______________________________________________________
____________________


Line Wrap Set to 25 in freemail.g-t.com

This is what the receiving end GM Header Shows wrt body:

This is a sample text with line wrap set to 25 to see the source of the mes=
sage as recd by another GM account not on the same server as this account.

How to get the body also to wrap as per settings by user and also avoid those '=' signs from showing up in source.....

TIA
Anup

Last edited by:

anup123: Jun 24, 2004, 4:38 PM
Quote Reply
Re: [anup123] footer wraps, body doesn't In reply to
Hi.

BTW i am on GM2.2.0 with the patched Tools.pm to take care of the url distortion due to wrapping issue. I hope i have expressed the problem clearly.

Anup
Quote Reply
Re: [anup123] footer wraps, body doesn't In reply to
There's a bug in Compose.pm:
Code:
@@ -784,6 +784,7 @@
my $text_body = $html_body;
$self->html_to_text(\$text_body);
$IN->html_unescape(\$text_body);
+ $text_body = $self->linewrap($USER->{opts}->{compose}->{line_wrap}, \$text_body) if $USER->{opts}->{compose}->{line_wrap};
$size += length($html_body) + length($text_body);

$parts = $m->new_part('Content-Type' => 'multipart/alternative');
@@ -814,6 +815,10 @@
# be in $send{msg} instead of the in the GT::Mail::Part object.
if (@attachments) {
$text_body = delete $send{msg};
+ $text_body = $self->linewrap($USER->{opts}->{compose}->{line_wrap}, \$text_body) if $USER->{opts}->{compose}->{line_wrap};
+ }
+ else {
+ $send{msg} = $self->linewrap($USER->{opts}->{compose}->{line_wrap}, \$send{msg}) if $USER->{opts}->{compose}->{line_wrap};
}
$size += length($text_body}
@@ -1181,10 +1181,10 @@
if ($fmt eq 'text' and $type eq 'text/html') {
$self->html_to_text($body);
$IN->html_escape($body);
- $self->linewrap($USER->{opts}->{compose}->{line_wrap}, $body) if ($USER->{opts}->{compose}->{line_wrap});
+ $$body = $self->linewrap($USER->{opts}->{compose}->{line_wrap} - 3, $body) if ($USER->{opts}->{compose}->{line_wrap} and $USER->{opts}->{compose}->{line_wrap} > 3);
}
elsif ($fmt eq 'text' and $type eq 'text/plain') {
- $self->linewrap($USER->{opts}->{compose}->{line_wrap}, $body) if ($USER->{opts}->{compose}->{line_wrap});
+ $$body = $self->linewrap($USER->{opts}->{compose}->{line_wrap} - 3, $body) if ($USER->{opts}->{compose}->{line_wrap} and $USER->{opts}->{compose}->{line_wrap} > 3);
$IN->html_escape($body);
}
elsif ($fmt eq 'html' and $type eq 'text/plain') {
This fixes a bug with wrapping text parts of sent emails, as well as wrapping quoted replies.

Adrian

Last edited by:

brewt: Jun 29, 2004, 3:04 PM
Quote Reply
Re: [brewt] footer wraps, body doesn't In reply to
Hi Adrian.

I think my Compose.pm doesn't have the same version as yours. I couldn't find the relevant portions (except the last one). Compose.pm is attached for your reference.

Thanks
Anup
Quote Reply
Re: [anup123] footer wraps, body doesn't In reply to
Here's a diff for the Compose.pm from 2.2.0:
Code:
--- Compose.pm.org 2004-07-01 19:50:18.000000000 -0700
+++ Compose.pm 2004-07-01 19:54:36.000000000 -0700
@@ -716,6 +716,7 @@
my $copy = $msg_body;
$self->html_to_text(\$copy);
$IN->html_unescape(\$copy);
+ $copy = $self->linewrap($USER->{opts}->{compose}->{line_wrap}, \$copy) if $USER->{opts}->{compose}->{line_wrap};
$size += length($copy);
$ipart->parts($m->new_part(
'Content-Type' => 'text/plain; charset="' . ($USER->{opts}->{compose}->{charset} || "US-ASCII") . '"',
@@ -732,6 +733,7 @@
# Set content type if we have regular attachments.
elsif (@attach) {
my $msg_body = delete $send{msg};
+ $msg_body = $self->linewrap($USER->{opts}->{compose}->{line_wrap}, \$msg_body) if $USER->{opts}->{compose}->{line_wrap};
$size += length($msg_body);
unshift @attach, $m->new_part(
'Content-Type' => 'text/plain; charset="' . ($USER->{opts}->{compose}->{charset} || "US-ASCII") . '"',
@@ -742,6 +744,7 @@
}
# Otherwise text/plain.
else {
+ $send{msg} = $self->linewrap($USER->{opts}->{compose}->{line_wrap}, \$send{msg}) if $USER->{opts}->{compose}->{line_wrap};
$send{'Content-Type'} = 'text/plain; charset="' . ($USER->{opts}->{compose}->{charset} || "US-ASCII") . '"';
}

@@ -1107,10 +1110,10 @@
if ($fmt eq 'text' and $type eq 'text/html') {
$self->html_to_text($body);
$IN->html_escape($body);
- $self->linewrap($USER->{opts}->{compose}->{line_wrap}, $body) if ($USER->{opts}->{compose}->{line_wrap});
+ $$body = $self->linewrap($USER->{opts}->{compose}->{line_wrap}, $body) if ($USER->{opts}->{compose}->{line_wrap});
}
elsif ($fmt eq 'text' and $type eq 'text/plain') {
- $self->linewrap($USER->{opts}->{compose}->{line_wrap}, $body) if ($USER->{opts}->{compose}->{line_wrap});
+ $$body = $self->linewrap($USER->{opts}->{compose}->{line_wrap}, $body) if ($USER->{opts}->{compose}->{line_wrap});
$IN->html_escape($body);
}
elsif ($fmt eq 'html' and $type eq 'text/plain') {

Adrian
Quote Reply
Re: [brewt] footer wraps, body doesn't In reply to
Hi Adrian.

Sorry to say, i couldn't really find the

@@ -784,6 +784,7 @@

and

@@ -814,6 +815,10 @@

sections in my Compose.pm

Revision : $Id: Compose.pm,v 1.107 2003/10/12 23:05:52 brewt Exp $

So i really could not patch and test the suggested bug-fix.
I am on GM 2.2.0

Any suggestions.

Thanks
Anup
Quote Reply
Re: [anup123] footer wraps, body doesn't In reply to
The first diff's are against 2.2.3's Compose.pm, the 2nd diff is against 2.2.0 (against the Compose.pm you posted).

Adrian
Quote Reply
Re: [brewt] footer wraps, body doesn't In reply to
Hi.

Thanks it fixed.
I am sure the fix would be available in all subsequent downloads of GM 2.X

Anup
Quote Reply
Re: [anup123] footer wraps, body doesn't In reply to
Hello Anup et al:

How did you apply the patches for the text wrapping:
1) Download the complete compose.htm
or
2) etc... ?

I'm actually on gm-2.2.3

Thank you, peter
back
Quote Reply
Re: [pyc] footer wraps, body doesn't In reply to
Here's a replacement one for 2.2.3.

Adrian