[Moin-user] [Moin-User] notification email problem after upgrade

Mehdi Hassanpour mehdi.public at gmail.com
Fri Sep 8 03:56:01 EDT 2006


Thanks, the patch solved my problem...


On 9/6/06, Thomas Waldmann <tw-public at gmx.de> wrote:
>
>
> > After upgrade to MoinMoin 1.5.4 I don't receive notification mails in
> > correct readable format...
> > How should I know that MoinMoin sends mails with UTF-8 encoding ? I
> don't
> > have any problem with English texts, my problem is with Persian texts...
> > I think MoinMoin 1.5.4 doesn't send emails in UTF-8 format... I didn't
> > have
> > this problem with MoinMoin 1.5.3
> This is not a moin bug, but different behaviour of different python
> versions, see there:
>
>
> http://moinmoin.wikiwikiweb.de/MoinMoinBugs/UnicodeMailNotificationEncodingBroken
>
>
> http://moinmoin.wikiwikiweb.de/MoinMoinBugs/ResetPasswordEmailImproperlyEncoded
>
> This patch should workaround it for all python versions:
>
> --- a/MoinMoin/util/mail.py     Thu Jul 20 17:38:59 2006 +0200
> +++ b/MoinMoin/util/mail.py     Thu Jul 20 18:01:31 2006 +0200
> @@ -74,8 +74,14 @@ def sendmail(request, to, subject, text,
>      charset = Charset(config.charset)
>      charset.header_encoding = QP
>      charset.body_encoding = QP
> -    msg.set_charset(charset)
> -    msg.set_payload(charset.body_encode(text))
> +    msg.set_charset(charset)
> +
> +    # work around a bug in python 2.4.3 and above:
> +    msg.set_payload('=')
> +    if msg.as_string().endswith('='):
> +        text = charset.body_encode(text)
> +
> +    msg.set_payload(text)
>
>      # Create message headers
>      # Don't expose emails addreses of the other subscribers, instead we
>
> It will be included in 1.5.5 release soon.
>
>
>
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Moin-user mailing list
> Moin-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/moin-user
>



-- 
********************************************************
Yours Sincerely, Mehdi Hassanpour
----------------------------------------------------------------------
/* Of one Essence is the human race,
Thusly has Creation put the Base;
One Limb impacted is sufficient,
For all Others to feel the Mace.
                           ~Saadi (persian poet) -1258 */
----------------------------------------------------------------------
http://ImPersian.com     |     http://Hezardastan.org
********************************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/moin-user/attachments/20060908/db10a8cb/attachment.html>


More information about the Moin-user mailing list