Random spaces inserted into email body

Bug #691366 reported by Omar Zermeño
36
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Mahara
Invalid
Medium
Unassigned
1.3
Won't Fix
Undecided
Unassigned
1.4
Won't Fix
Undecided
Unassigned
1.5
Won't Fix
Undecided
Unassigned
1.6
Won't Fix
Undecided
Unassigned

Bug Description

When a new user registers and receives the confirmation email, the link may be broken when viewed with gmail or other mail clients. Hotmail works fine.

We tried installing mahara on a different server and environment, and the problem persists.

Please advice,

Thanks in advance

Tags: email
Revision history for this message
Ruslan Kabalin (rkabalin) wrote :

Hello Omar,

Can you please paste the "broken" registration URL for inspection (for both gmail and hotmail). You may remove the domain name part if you wish. I am interested to see the part starting from registration.php (e.g. register.php?key=nUTL82CbkvRKaHpM).

Ruslan

Changed in mahara:
importance: Undecided → Medium
Revision history for this message
Ruslan Kabalin (rkabalin) wrote :

Also, which version of mahara do you use? Can you try to replicate the bug on http://master.dev.mahara.org?

Revision history for this message
Omar Zermeño (omarrub) wrote :

Here is a copy of the broken link;

http://ww= w.ruvir.com/apps/monterreynlmx/rsocial/register.php?key=9ThZGiMJ0H7Efeow<= /a>

This actually was sent to a hotmail account.

Revision history for this message
Omar Zermeño (omarrub) wrote :

This one was setn to a hostmonster account:

http://ww w.ruvir.com/apps/monterreynlmx/rsocial/register.php?key=YGjxM1OXLkwmvTEn< /a>

Revision history for this message
Omar Zermeño (omarrub) wrote :

We actually also tried two versions mahara-1.3.2 and mahara-1.3.3, and the broken links persisted.

We currently try to work with mahara 1.3.2

We noticed that on gmail the problem dos NOT appear, but in other mail clients such as hotmail, it does.

Revision history for this message
Omar Zermeño (omarrub) wrote :

We have noticed that at http://master.dev.mahara.org the links work fine. Is this solved on a new release?

Revision history for this message
Ruslan Kabalin (rkabalin) wrote :

Omar, some more questions, when you say "broken" do you mean these formatting errors in your example (e.g. ww= w)? I have just tested with Hotmail and 1.3.3, and it works fine for me.
Can I ask you to test it with http://demo.mahara.org (it is 1.3.3). And also, for those messages with broken link, can you please attach the whole message (in Hotmail click on the icon with down arrow near "Reply" and choose Original message, then save it into text file and attach here)
Thanks

Revision history for this message
Omar Zermeño (omarrub) wrote : Fw: Registro en RSocial

Hi Ruslan,

The formatting errors do not occur when using http://demo.mahara.org ; However, we keep on getting these errors from our installations in two different servers and with both versions.

We are really excited to use mahara, and wonder if maybe by working via moodle the registration link formatting errors would cease.
I am attaching the email.

Thanks,
Omar Zermeño

--------------------------------------------------
From: "Ruslan Kabalin" <email address hidden>
Sent: Friday, December 17, 2010 2:16 PM
To: <email address hidden>
Subject: [Bug 691366] Re: registration link broken

> Omar, some more questions, when you say "broken" do you mean these formatting errors in your example (e.g. ww= w)? I have just tested with Hotmail and 1.3.3, and it works fine for me.
> Can I ask you to test it with http://demo.mahara.org (it is 1.3.3). And also, for those messages with broken link, can you please attach the whole message (in Hotmail click on the icon with down arrow near "Reply" and choose Original message, then save it into text file and attach here)
> Thanks
>
> --
> You received this bug notification because you are a direct subscriber
> of the bug.
> https://bugs.launchpad.net/bugs/691366
>
> Title:
> registration link broken
>
> Status in Mahara ePortfolio:
> New
>
> Bug description:
> When a new user registers and receives the confirmation email, the link may be broken when viewed with gmail or other mail clients. Hotmail works fine.
>
> We tried installing mahara on a different server and environment, and the problem persists.
>
> Please advice,
>
> Thanks in advance
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/mahara/+bug/691366/+subscribe
>

Hola Omar,
Gracias por crear una cuenta en RSocial.
Siga este enlace para completar el proceso de alta:
http://www.ruvir.com/apps/monterreynlmx/rsocial/register.php?key=VI6H5cKJWUiY3MXv

Debe seguir este enlace antes de que transcurran 24 horas desde la recepción
de este mensaje
--Gracias, El equipo RSocial

Por favor no responda a este mensaje.

Revision history for this message
Omar Zermeño (omarrub) wrote : Re: registration link broken

Hi Ruslan,

The formatting errors do not occur when using http://demo.mahara.org ; However, we keep on getting these errors from our installations in two different servers and with both versions.

We are really excited to use mahara, and wonder if maybe by working via moodle the registration link formatting errors would cease.
I am attaching the email.

Thanks,
Omar Zermeño

Revision history for this message
Omar Zermeño (omarrub) wrote :
Revision history for this message
Ruslan Kabalin (rkabalin) wrote :

I managed to replicate this one actually I think. Omar, I guess you use a mail-client, like Outlook Express or you see this problem on web-mail?

Changed in mahara:
milestone: none → 1.4.0
Revision history for this message
Ruslan Kabalin (rkabalin) wrote :

The problem is related to quoted-printable encoding and word-wrapping.

The original Omar's email looks like:

<code>
--b1_1fb8dd3dce9725e7da9355d0016e0c9e
Content-Type: text/html; charset = "UTF-8"
Content-Transfer-Encoding: quoted-printable

<p>Hola Omar, </p><p>Gracias por crear una cuenta en RSocial. Siga este enl=

ace para completar el proceso de alta:</p><p><a href=3D"http://www.ruvir.co=

m/apps/monterreynlmx/rsocial/register.php?key=3DVI6H5cKJWUiY3MXv">http://ww=

w.ruvir.com/apps/monterreynlmx/rsocial/register.php?key=3DVI6H5cKJWUiY3MXv<=

/a></p><p>Debe seguir este enlace antes de que transcurran 24 horas desde l=

a recepci=C3=B3n de este mensaje</p><pre> --Gracias, El equipo RSocial</pre=

>=0A=0A<p>Por favor no responda a este mensaje.</p>=0A
</code>

For some strange reason, Outlook Express does not handle encoded new line properly and that equal sign in the middle of URL above looks in the message body like that:

http://ww=w.ruvir.com/apps/monterreynlmx/rsocial/register.php?key=3DVI6H5cKJWUiY3MXv

Revision history for this message
Omar Zermeño (omarrub) wrote : RE: [Bug 691366] Re: registration link broken

Hi Ruslan,

It makes sense, since I can Identify the same problem when using outlook and outlook express. I will try to reproduce it using a webmail client, just to doublecheck.

Omar

> Date: Thu, 23 Dec 2010 15:16:00 +0000
> From: <email address hidden>
> To: <email address hidden>
> Subject: [Bug 691366] Re: registration link broken
>
> The problem is related to quoted-printable encoding and word-wrapping.
>
> The original Omar's email looks like:
>
> <code>
> --b1_1fb8dd3dce9725e7da9355d0016e0c9e
> Content-Type: text/html; charset = "UTF-8"
> Content-Transfer-Encoding: quoted-printable
>
> <p>Hola Omar, </p><p>Gracias por crear una cuenta en RSocial. Siga este
> enl=
>
> ace para completar el proceso de alta:</p><p><a
> href=3D"http://www.ruvir.co=
>
> m/apps/monterreynlmx/rsocial/register.php?key=3DVI6H5cKJWUiY3MXv">http://ww=
>
> w.ruvir.com/apps/monterreynlmx/rsocial/register.php?key=3DVI6H5cKJWUiY3MXv<=
>
> /a></p><p>Debe seguir este enlace antes de que transcurran 24 horas
> desde l=
>
> a recepci=C3=B3n de este mensaje</p><pre> --Gracias, El equipo
> RSocial</pre=
>
> >=0A=0A<p>Por favor no responda a este mensaje.</p>=0A
> </code>
>
> For some strange reason, Outlook Express does not handle encoded new
> line properly and that equal sign in the middle of URL above looks in
> the message body like that:
>
> http://ww=w.ruvir.com/apps/monterreynlmx/rsocial/register.php?key=3DVI6H5cKJWUiY3MXv
>
> --
> You received this bug notification because you are a direct subscriber
> of the bug.
> https://bugs.launchpad.net/bugs/691366
>
> Title:
> registration link broken
>
> Status in Mahara ePortfolio:
> New
>
> Bug description:
> When a new user registers and receives the confirmation email, the link may be broken when viewed with gmail or other mail clients. Hotmail works fine.
>
> We tried installing mahara on a different server and environment, and the problem persists.
>
> Please advice,
>
> Thanks in advance
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/mahara/+bug/691366/+subscribe

Revision history for this message
Omar Zermeño (omarrub) wrote :

I just checked the link received via browser (not outlook), for hotmail, and
the formatting error appears.

But when using gmail, the link is sent with no errors.

This is the message sent to hotmail and read via browser:

Hola Omar,

Gracias por crear una cuenta en RSocial. Siga este enl= ace para completar
el proceso de alta:

http://ww=
w.ruvir.com/apps/monterreynlmx/rsocial/register.php?key=VI6H5cKJWUiY3MXv<=
/a>

Debe seguir este enlace antes de que transcurran 24 horas desde l= a
recepción de este mensaje

 --Gracias, El equipo RSocial
Por favor no responda a este mensaje.

Omar Zermeño

Changed in mahara:
status: New → Confirmed
Revision history for this message
Ruslan Kabalin (rkabalin) wrote : Re: registration link broken

Not sure how to fix it, it works for some people while does not work for others.

It looks like EncodeQP method in PHPMailer mostly meets RFC 1521, (e.g. it limits the string length to 76 chars as RFC 1521), though it exports line-end from general settings (public $LE = "\n";), while RFC suggest using "CRLF" (\r\n). However, setting $LE to "\r\n" does not do much difference for me as far as I can see (still broken in outlook express).

Unlike Omar suggest, in either of settings, it is not broken for me in Hotmail web interface.

Revision history for this message
Ruslan Kabalin (rkabalin) wrote :

This PHPMailer bug looks similar to what Omar is talking about: http://sourceforge.net/tracker/index.php?func=detail&aid=3145994&group_id=26031&atid=385707

Revision history for this message
François Marier (fmarier) wrote :

Two things we could try to get it to work:

1- changing the Content-Transfer-Encoding to "7 bit" or another non-"quoted-printable" value\

2- not sending an HTML version of the email and only sending a plain text version

summary: - registration link broken
+ registration link broken in Outlook Express
Revision history for this message
Omar Zermeño (omarrub) wrote : Re: [Bug 691366] Re: registration link broken

Qué tal Pabis!

Aquí te mando el correo último que hemos recibido de los de mahara.

También, por otro lado, los del iphone si se animan, siempre y cuando les
demos la certeza de que si se puede. Me enseñaron un par de aplicaciones
que ya están en el appstore, y que si se mezclaran, podrían tener el efecto
deseado. Dicen que ni siquiera es necesario, silbar, si con tararearla
basta.

¿qué les decimos?

Omar Zermeño
 Tempestad 210
Col. Viento Libre, Cong. Los Rodríguez
Santiago, Nuevo León, 67300 México

Tel. 52+ (81) 82668435
Mobil52+ (81) 13225012
e-mail <email address hidden>

--------------------------------------------------
From: "François Marier" <email address hidden>
Sent: Wednesday, February 23, 2011 7:15 PM
To: <email address hidden>
Subject: [Bug 691366] Re: registration link broken

> Two things we could try to get it to work:
>
> 1- changing the Content-Transfer-Encoding to "7 bit" or another non
> -"quoted-printable" value\
>
> 2- not sending an HTML version of the email and only sending a plain
> text version
>
> ** Summary changed:
>
> - registration link broken
> + registration link broken in Outlook Express
>
> --
> You received this bug notification because you are a direct subscriber
> of the bug.
> https://bugs.launchpad.net/bugs/691366
>
> Title:
> registration link broken in Outlook Express
>
> Status in Mahara ePortfolio:
> Confirmed
>
> Bug description:
> When a new user registers and receives the confirmation email, the
> link may be broken when viewed with gmail or other mail clients.
> Hotmail works fine.
>
> We tried installing mahara on a different server and environment, and
> the problem persists.
>
> Please advice,
>
> Thanks in advance
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/mahara/+bug/691366/+subscribe
>

Revision history for this message
Omar Zermeño (omarrub) wrote :

My apologies, I meant to send the previous email to my tech lead. We look
forward to having mahara up and running.

Thanks Francois,

Omar Zermeño

--------------------------------------------------
From: "Omar Zermeño" <email address hidden>
Sent: Wednesday, February 23, 2011 11:06 PM
To: <email address hidden>
Subject: Re: [Bug 691366] Re: registration link broken

> Qué tal Pabis!
>
> Aquí te mando el correo último que hemos recibido de los de mahara.
>
> También, por otro lado, los del iphone si se animan, siempre y cuando les
> demos la certeza de que si se puede. Me enseñaron un par de aplicaciones
> que ya están en el appstore, y que si se mezclaran, podrían tener el
> efecto
> deseado. Dicen que ni siquiera es necesario, silbar, si con tararearla
> basta.
>
> ¿qué les decimos?
>
> Omar Zermeño
> Tempestad 210
> Col. Viento Libre, Cong. Los Rodríguez
> Santiago, Nuevo León, 67300 México
>
> Tel. 52+ (81) 82668435
> Mobil52+ (81) 13225012
> e-mail <email address hidden>
>
>
> --------------------------------------------------
> From: "François Marier" <email address hidden>
> Sent: Wednesday, February 23, 2011 7:15 PM
> To: <email address hidden>
> Subject: [Bug 691366] Re: registration link broken
>
>> Two things we could try to get it to work:
>>
>> 1- changing the Content-Transfer-Encoding to "7 bit" or another non
>> -"quoted-printable" value\
>>
>> 2- not sending an HTML version of the email and only sending a plain
>> text version
>>
>> ** Summary changed:
>>
>> - registration link broken
>> + registration link broken in Outlook Express
>>
>> --
>> You received this bug notification because you are a direct subscriber
>> of the bug.
>> https://bugs.launchpad.net/bugs/691366
>>
>> Title:
>> registration link broken in Outlook Express
>>
>> Status in Mahara ePortfolio:
>> Confirmed
>>
>> Bug description:
>> When a new user registers and receives the confirmation email, the
>> link may be broken when viewed with gmail or other mail clients.
>> Hotmail works fine.
>>
>> We tried installing mahara on a different server and environment, and
>> the problem persists.
>>
>> Please advice,
>>
>> Thanks in advance
>>
>> To unsubscribe from this bug, go to:
>> https://bugs.launchpad.net/mahara/+bug/691366/+subscribe
>>
>
> --
> You received this bug notification because you are a direct subscriber
> of the bug.
> https://bugs.launchpad.net/bugs/691366
>
> Title:
> registration link broken in Outlook Express
>
> Status in Mahara ePortfolio:
> Confirmed
>
> Bug description:
> When a new user registers and receives the confirmation email, the
> link may be broken when viewed with gmail or other mail clients.
> Hotmail works fine.
>
> We tried installing mahara on a different server and environment, and
> the problem persists.
>
> Please advice,
>
> Thanks in advance
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/mahara/+bug/691366/+subscribe
>

Revision history for this message
François Marier (fmarier) wrote : Re: registration link broken in Outlook Express

Another thread with this bug, this time on Hotmail:

  http://mahara.org/interaction/forum/topic.php?id=2880

Changed in mahara:
importance: Medium → High
summary: - registration link broken in Outlook Express
+ registration link broken in Outlook Express and Hotmail
Revision history for this message
Ruslan Kabalin (rkabalin) wrote : Re: registration link broken in Outlook Express and Hotmail

Omar also reported Hotmail problem, though I was only able to reproduce the one with Outlook, Mahara registration email on hotmail looks fine for me.

Revision history for this message
Darryl Hamilton (lordp) wrote :

Hi Omar

Can I get you to do a couple of things for me?

1) What version of PHP are you using?
2) Copy and paste the stream filters you have available

For #2, running this in a shell should do the trick
php -r 'var_dump(stream_get_filters());'

I'm specifically looking for 'convert.*' in the list.

Thanks
Darryl

Changed in mahara:
importance: High → Medium
Changed in mahara:
milestone: 1.4.0 → none
Revision history for this message
Mike Slywka (mike-slywka) wrote :

I'm seeing the same problem here. Here's what I'm running:

PHP 5.3.6
Mahara 1.3.6

# php -r 'var_dump(stream_get_filters());'

array(10) {
  [0]=>
  string(6) "zlib.*"
  [1]=>
  string(7) "bzip2.*"
  [2]=>
  string(15) "convert.iconv.*"
  [3]=>
  string(12) "string.rot13"
  [4]=>
  string(14) "string.toupper"
  [5]=>
  string(14) "string.tolower"
  [6]=>
  string(17) "string.strip_tags"
  [7]=>
  string(9) "convert.*"
  [8]=>
  string(8) "consumed"
  [9]=>
  string(7) "dechunk"
}

I see that 1.4.0 was released 2 days ago, do you know if this bug is fixed in that version?

Revision history for this message
François Marier (fmarier) wrote :

I don't believe it was fixed in 1.4 because we're still having problems reproducing this problem.

Revision history for this message
michael foote (7a532kg9ls-w27kl24-6ry1dcq71b) wrote :

Hi,

What has happened about this? It is still happening on a Mahara install I did yesterday.

Has anyone worked out how to fix it?

Revision history for this message
Mike Leam (mike-leam) wrote :

We had what on the face of it appears to be a related issue - see https://mahara.org/interaction/forum/topic.php?id=5118#post22198 and fixed it as follows

(1) Log on to Mahara as Admin

(2) Go to the Site Administration|Site Options|Email Settings page

(3) Populate the SMTP host field with 'localhost'

(4) Populate and SMTP port field with '25'

(5) Click the Update Site Options button

Might be worth a try?

Regards,

Mike

Revision history for this message
Aaron Wells (u-aaronw) wrote :

Hi Mike,

Could you please let me know:

1. What versions of PHP & Mahara are you running?

2. What output do you get if you run this in a PHP script:

<?php var_dump(stream_get_filters()); ?>

Cheers,
Aaron

Revision history for this message
Mike Leam (mike-leam) wrote :

Aaron,

Apologies for the delay in responding - I've been out of the office for a couple of months.

Anyway, to belatedly answer your questions:-

- We are running Mahara 1.5.1 (we plan to upgrade soon)
- We are running PHP 5.3.3
- The output from <?php var_dump(stream_get_filters()); ?> is as follows

array(10) { [0]=> string(6) "zlib.*" [1]=> string(7) "bzip2.*" [2]=> string(15) "convert.iconv.*" [3]=> string(12) "string.rot13" [4]=> string(14) "string.toupper" [5]=> string(14) "string.tolower" [6]=> string(17) "string.strip_tags" [7]=> string(9) "convert.*" [8]=> string(8) "consumed" [9]=> string(7) "dechunk" }

I hope this is of some use to you!?

Regards,

Mike

Revision history for this message
Aaron Wells (u-aaronw) wrote :

Thanks Mike!

Hm, now that I've got that info, I can't remember what I wanted to know the output of stream_get_filters() for! :) Looking at the code, I think maybe it's because the presence or absence of the "convert.*" filter determines whether or no phpmailer sends the email text through a particular converter function or not. But you've got "convert.*", and I've also got it on my local machine (where this code works fine) so that doesn't seem to be the cause of the problem.

I think your workaround of setting localhost:25 fixes the problem because it causes the email to be sent by class.smtp.php rather than class.phpmailer.php.

So, it looks like this is, in fact, a phpmailer bug. I see that phpmailer is up to version 5.2.6 now ( https://github.com/PHPMailer/PHPMailer/blob/master/changelog.md ). I wonder if they've solved this bug in the newer versions.

Revision history for this message
Son Nguyen (ngson2000) wrote :

Upgrading PHPMailer to 5.2.7 may solve this problem
https://reviews.mahara.org/#/c/2675/

Revision history for this message
Aaron Wells (u-aaronw) wrote :

Marking this bug "Invalid", because the last version of Mahara we've seen it reported in, was Mahara 1.6. It's likely that upgrading PHPMailer did resolve the problem.

For posterity, I'm marking down the versions of Mahara the problem is known to affect. (But setting them to "Won't Fix" because they're all out of support now.)

summary: - registration link broken in Outlook Express and Hotmail
+ Random spaces inserted into email body
tags: added: email
Changed in mahara:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.