Posted by: JacksonOr - Tuesday, 5 November 2013 09:06:30
Hello friends,
I have installed the latest version (2.0.0) of this fantastic forum software and I really like it but there is a problem with verification emails.
The content of such emails include very strange characters (look Chinese to me) and therefore can not be read by users.They are like this:
㜀䄀䈀㈀㌀ 㘀䐀㠀㈀䘀㌀䄀㤀㔀 㘀㈀䄀㤀㈀㠀㤀㜀䄀䈀㈀㌀ 㘀䐀㠀㈀䘀㌀䄀㤀㔀 㘀㈀䄀㤀㈀㠀㤀㜀䄀䈀㈀㌀ 㘀䐀㠀㈀䘀㌀䄀㤀㔀 㘀㈀䄀㤀㈀㠀㤀㜀䄀䈀㈀㌀ 㘀䐀㠀㈀䘀㌀䄀㤀㔀 㘀㈀䄀㤀㈀㠀㤀㜀䄀䈀㈀㌀ 㘀䐀㠀㈀䘀㌀䄀㤀㔀 㘀㈀䄀㤀㈀㠀㤀㜀䄀䈀㈀㌀ 㘀䐀㠀㈀䘀㌀䄀㤀㔀 㘀㈀䄀㤀㈀㠀㤀
I have turned email verification off for now but can not continue this way due to high spammers activity.My forum is in Arabic.
Also In the users page where you can see list of members it is not possible to sort ! is it by design or a bug?
Regards
Jackson
Posted by: Theodor - Monday, 18 November 2013 17:54:32
I have exactly the same problem! anybody please?
Posted by: squirrel - Thursday, 21 November 2013 08:02:52
This is a localization/culture issue - it appeared around when YAF moved to .NET 4.0 -- my understanding is it is in roadmap for fix. I am also investigating workaround as we have same issue, but it is random and not often it occurs.
Posted by: tha_watcha - Friday, 22 November 2013 04:46:24
I located the source of the problem, it is an encoding issue. The wrong encoding causing Arabic or Russian letters to be encoded in Chinese chars. Some email clients are display it correctly, but others not.
I have a fix ready, but since I can not directly reproduce I need someone who can test it out, or let me know in which email client it shows Chinese chars.
Posted by: squirrel - Friday, 22 November 2013 11:29:10
I've gotten foreign characters via MS Outlook 2007 (primary mail client) -- I have gmail as well but don't use it for forum accounts -- our own forums the issue seems to have cleared, but I took a long pass through our members table and changed many problems with the language settings -- after that, no more messages were attempt to come from our main forum in 'high bit' encoding like creates problem --
PS - I found same issue last night searching, but after days trying to solve other ASP.NET project I gave up and left it to people who know what they're doing. For the life of me, I can sometimes hack together code to make something work, but otherwise I can't wrap my head arount .NET no matter what I do or try...
Posted by: Theodor - Friday, 22 November 2013 20:44:51
[quote=tha_watcha;61938]I located the source of the problem, it is an encoding issue. The wrong encoding causing Arabic or Russian letters to be encoded in Chinese chars. Some email clients are display it correctly, but others not.
I have a fix ready, but since I can not directly reproduce I need someone who can test it out, or let me know in which email client it shows Chinese chars.[/quote]
I will be glad to help
Posted by: tha_watcha - Sunday, 24 November 2013 09:53:57
[quote=Theodor;61945][quote=tha_watcha;61938]I located the source of the problem, it is an encoding issue. The wrong encoding causing Arabic or Russian letters to be encoded in Chinese chars. Some email clients are display it correctly, but others not.
I have a fix ready, but since I can not directly reproduce I need someone who can test it out, or let me know in which email client it shows Chinese chars.[/quote]
I will be glad to help[/quote]
I attached the updated YAF 2.0 dlls, simply replace them on your server.
Posted by: Theodor - Thursday, 28 November 2013 20:30:45
OK buddy.I will report back.
Posted by: Tًheodor - Thursday, 5 December 2013 15:24:11
[quote=tha_watcha;61961][quote=Theodor;61945][quote=tha_watcha;61938]I located the source of the problem, it is an encoding issue. The wrong encoding causing Arabic or Russian letters to be encoded in Chinese chars. Some email clients are display it correctly, but others not.
I have a fix ready, but since I can not directly reproduce I need someone who can test it out, or let me know in which email client it shows Chinese chars.[/quote]
I will be glad to help[/quote]
I attached the updated YAF 2.0 dlls, simply replace them on your server.[/quote]
Hey watcha,
I had no success running the app.It asks for Dotnetnuke dll .
Do you mind sharing the actual code so that I can compile it on my own machine?
Theodor
Posted by: tha_watcha - Thursday, 5 December 2013 15:36:04
Sorry, there is the. Yaf.dotnetnuke.module.dll included, if you remove that file itv should Work.
Posted by: Tًheodor - Thursday, 5 December 2013 17:57:21
Yes Watcha It works now and emails are sent correctly [thumbup]
Posted by: tha_watcha - Friday, 6 December 2013 13:50:54
[quote=Tًheodor;62112]Yes Watcha It works now and emails are sent correctly [thumbup][/quote]
Thanks for your testing! I committed the update code. This fix is included in YAF 2.1
Posted by: coral - Wednesday, 19 February 2014 08:31:58
hi there. I have the same problem with yaf 2. I cannot simply update my site to yaf 2.1 because I have customized it for my own need.
Could you please tell me which file and part of code must be changed so I can fix it myself.
many thanks.
one more thing, can I send the "Approval Key" manually. Is it stored somewhere so I can access it and sent it out for users who had the problem.
Posted by: tha_watcha - Wednesday, 19 February 2014 10:42:41
[quote=coral;62845]Could you please tell me which file and part of code must be changed so I can fix it myself.
many thanks.[/quote]
here...
https://github.com/YAFNET/YAFNET/commit/503b5dab388b76488b692d98afdf937e6b2fa9bc
at some point you should create a fork of your changes, or you will never able to upgrade.
[quote=coral;62845]one more thing, can I send the "Approval Key" manually. Is it stored somewhere so I can access it and sent it out for users who had the problem.[/quote]
Yes the email and the key (hash) are stored in the yaf_CheckEmail Table
Posted by: coral - Wednesday, 19 February 2014 14:38:53
Many thanks for your quick reply.
[quote=tha_watcha;62847]
at some point you should create a fork of your changes, or you will never able to upgrade.[/quote]
I am not familiar with fork. Can you explain a bit more please? How I can do it? Is there any special tools for that?
Posted by: tha_watcha - Thursday, 20 February 2014 12:43:01
[quote=coral;62849]Many thanks for your quick reply.
[quote=tha_watcha;62847]
at some point you should create a fork of your changes, or you will never able to upgrade.[/quote]
I am not familiar with fork. Can you explain a bit more please? How I can do it? Is there any special tools for that?[/quote]
There is a basic guide on what a fork is and how to do a fork
https://help.github.com/articles/fork-a-repo
What is basically does it clones the YAFNET repository and creates your own, where you can check in your own code modifications. And of course it allows you to sync your repository with the YAFNET repository, to always get the latest code.
The easiest to for managing git on your pc is proberly [url=http://windows.github.com/]GitHub for Windows[/url]
Posted by: Zero2Cool - Thursday, 20 February 2014 15:21:20
With YAF maintaining everything the same with bootstrap and my desire to tweak a few things with forumlist/topiclist/postlist display instead, a fork for what I want might be a great idea. That's exciting!!
Posted by: salma - Thursday, 20 February 2014 19:10:57
hi friends.
i have the same problem but the version that i installed is 1.9.6.1.
there is a problem with verification emails.
The content of emails include very strange characters and therefore can not be read by users(in yahoomail like chines in gmail like the image below).
the language that i'm using is persian(farsi).
thank you for your help.:)
Posted by: coral - Thursday, 20 February 2014 21:13:32
[quote=tha_watcha;62847][quote=coral;62845]Could you please tell me which file and part of code must be changed so I can fix it myself.
many thanks.[/quote]
here...
https://github.com/YAFNET/YAFNET/commit/503b5dab388b76488b692d98afdf937e6b2fa9bc
[/quote]
I made the changes and the body of email is fine now [b]but [/b]To and From are still in strange character. The forum language is Farsi.
Posted by: tha_watcha - Friday, 21 February 2014 14:42:14
[quote=coral;62861][quote=tha_watcha;62847][quote=coral;62845]Could you please tell me which file and part of code must be changed so I can fix it myself.
many thanks.[/quote]
here...
https://github.com/YAFNET/YAFNET/commit/503b5dab388b76488b692d98afdf937e6b2fa9bc
[/quote]
I made the changes and the body of email is fine now [b]but [/b]To and From are still in strange character. The forum language is Farsi.[/quote]
Apply my latest commit, now it should work correctly
[url=https://github.com/YAFNET/YAFNET/commit/5a6476b5e671d7b40d235406e89e8a16a4e4916d]https://github.com/YAFNET/YAFNET/commit/5a6476b5e671d7b40d235406e89e8a16a4e4916d[/url]
Posted by: coral - Saturday, 22 February 2014 10:07:37
Am I right that for solving this problem the only neccessory changes that sould be made is adding following three lines to [b]Populate [/b]method of [b]MailMessageExtensions[/b] (Located in \YAF.Core\Extensions\MailMessageExtensions.cs)???
[code=csharp]mailMessage.HeadersEncoding = Encoding.UTF8;
mailMessage.BodyEncoding = Encoding.UTF8;
mailMessage.SubjectEncoding = Encoding.UTF8;[/code]
or other changes needed as well?
Posted by: tha_watcha - Saturday, 22 February 2014 10:51:06
No other changes, just compile
Posted by: coral - Saturday, 22 February 2014 17:17:47
Then it must be a few more files to change as well. when I compile it there are some compiler errors like
YAF.Core.Services.YafSendMail' does not implement interface member 'YAF.Types.Interfaces.ISendMail.SendAllIsolated(System.Collections.Generic.IEnumerable, System.Action)'
'YAF.Core.Services.YafSendMail' does not implement interface member 'YAF.Types.Interfaces.ISendMail.SendAll(System.Collections.Generic.IEnumerable)'
and when I change the IsendMail interface then there is other compiler errors.
I think I have to change more than those 7 files mentioned in the link.
Posted by: tha_watcha - Saturday, 22 February 2014 17:33:31
[quote=coral;62896]Then it must be a few more files to change as well. when I compile it there are some compiler errors like
YAF.Core.Services.YafSendMail' does not implement interface member 'YAF.Types.Interfaces.ISendMail.SendAllIsolated(System.Collections.Generic.IEnumerable, System.Action)'
'YAF.Core.Services.YafSendMail' does not implement interface member 'YAF.Types.Interfaces.ISendMail.SendAll(System.Collections.Generic.IEnumerable)'
and when I change the IsendMail interface then there is other compiler errors.
I think I have to change more than those 7 files mentioned in the link.[/quote]
only add this 3 lines of code and it should compile with your version
Posted by: coral - Saturday, 22 February 2014 17:52:56
adding only those three lines didn't solve the problem. It seems I have to find all the files that needs upgrading.
Posted by: coral - Saturday, 22 February 2014 18:59:25
To sum up I upgraded the following fies and everything is fine now
yafsrc/YetAnotherForum.NET/install/default.aspx.cs
yafsrc/YAF.Types/Extensions/StringExtensions.cs
yafsrc/YAF.Core/Services/YafTemplateEmail.cs
yafsrc/YAF.Core/Services/YafSendMail.cs
yafsrc/YAF.Core/Services/YafDigest.cs
yafsrc/YAF.Core/Extensions/MailMessageExtensions.cs
yafsrc/YAF.Core/Extensions/ISendMailExtensions.cs
yafsrc/YAF.Types/Interfaces/IsendMail.cs
yafsrc/YAF.Core/Services/YafSendMailThreaded.cs