Problem: The function tries to detect beginning and end of the header section by using regular expressions. The problem is that this function is called recursively for parsing the sections of a multipart message. The sequence is:
for the whole message
for first section
for second section
...
As a matter of fact, when called for a section, this will never include a header. Hence the existing code will always return without filling the body block, since this is done by the second regular expression that fills the reg exp result in the $match[] array.
Solution: Just delete / comment the header start check:
Problem: The charset parameter is not processed correctly. Towards the end of the function a couple of special characters are replaced in a dedicated way. This must not be done if the text is UTF-8 encoded. Unfortunately this is checked only for the capital letter variant 'UTF-8'. In my case the character set came in as 'utf-8' which consequently destroyed the content of the body text. Solution: Modify the check to be case insensitive:
// And its 1252 variants if (strcasecmp($charset, 'UTF-8') !== 0)
The last item was particularly tricky as I only stumbled accidentally over the use of some German "Umlaut" character which caused some mails to fail.
I have made this changes locally to my server. What is the correct way of bringing the suggested changes into future versions of ElkArte? On a lighter note, I feel a little perplexed that this has not been brought up so far. I wonder how the "add topic by email" feature could ever work correctly. Any opinion on this?
Title: Re: [SOLVED] Help on Post/reply by email
Post by: radu81 on February 29, 2020, 08:03:16 am
Quote from: JPalmer – I have made this changes locally to my server. What is the correct way of bringing the suggested changes into future versions of ElkArte?
Quote from: JPalmer – On a lighter note, I feel a little perplexed that this has not been brought up so far. I wonder how the "add topic by email" feature could ever work correctly. Any opinion on this?
I don't have the knowledge to comment an discuss about coding, I'm not a coder but a simple forum admin. Consider that most of forum admins are not using this feature and I guess this is the reason why it has not been reported until now, I manage more than one elkarte forum and I never used or tested this feature. I'm pretty sure that @emanuele or @Spuds will asnswer soon
Thanks for your report
Title: Re: [SOLVED] Help on Post/reply by email
Post by: JPalmer on March 02, 2020, 10:41:02 am
Quote from: JPalmer – I have made this changes locally to my server. What is the correct way of bringing the suggested changes into future versions of ElkArte?
I have run headsmack into the same problem (with v1.1.6). Replies from valid user with valid email address go to "moderation" as "Email ID not in Database"
After reading through this thread and the linked thread, I'm a bit confused regarding the fix, vs. troubleshooting the problem, or troubleshooting subsequent formatting issues once the "Email ID not in Database" issue is resolved.
Can the explicit fix for getting past the "Email ID not in Database" be articulated?
Thanks Muchly...
-Steeley
Title: Re: [SOLVED] Help on Post/reply by email
Post by: JPalmer on October 26, 2020, 05:38:39 pm
I have run headsmack into the same problem (with v1.1.6). Replies from valid user with valid email address go to "moderation" as "Email ID not in Database"
After reading through this thread and the linked thread, I'm a bit confused regarding the fix, vs. troubleshooting the problem, or troubleshooting subsequent formatting issues once the "Email ID not in Database" issue is resolved.
Can the explicit fix for getting past the "Email ID not in Database" be articulated?
Thanks Muchly...
Hey Steeley, it has been a while, so that I had to get my memories together. For me the solution was to change the 3 source files mentioned earlier in this thread. I also have sent this changes to the github repository to have them included in future releases. Honestly, I don't know where this part of the story stands. I suspect the changes are not part of your v1.1.6.
Either way, I did do these changes in my installation and it works ever since. The html formatting of mails has room for improvement, but at least people can use the forum as kind of a mail-list. Please feel free to comment or ask questions.
Title: Re: [SOLVED] Help on Post/reply by email
Post by: Steeley on October 27, 2020, 01:59:43 am
Quote from: JPalmer – Hey Steeley, it has been a while, so that I had to get my memories together. For me the solution was to change the 3 source files mentioned earlier in this thread. I also have sent this changes to the github repository to have them included in future releases. Honestly, I don't know where this part of the story stands. I suspect the changes are not part of your v1.1.6.
Either way, I did do these changes in my installation and it works ever since. The html formatting of mails has room for improvement, but at least people can use the forum as kind of a mail-list. Please feel free to comment or ask questions.
...change the 3 source files mentioned earlier in this thread..
Bingo... Since the start of that message with those changes referred to "posting new topics" I wasn't sure if that was working the original generic reply via email issue or, once that was solved working subsequent new-topic formatting issues. Since I'm not a programmer, my coding experience is "basic'TM (figuratively and literally), and I play around with the code only when I know for sure that's what I need to do.
If you're not using 1.1.6, no - it's not incorporated in it either, and, like you, I was wondering how this hasn't been a bigger issue (it's fundamental to mail usage, after all). I already ruled out email clients and various mail servers, perhaps the issue is unique to the server OS (linux / x86_64 / Apache / php 7.2)?
Anyway, I'm off to back up some files and edit some code.. if it works I owe ya a beer..
Title: Re: [SOLVED] Help on Post/reply by email
Post by: Steeley on October 27, 2020, 07:05:23 pm
YESSSSSSSS.... that does indeed solve the email reply posting problem.
Perversely however, now that email replies are posting, the sender gets a Mail-Delivery Failed message piped from emailpost.php.. (I could just tell users that's actually a "posting confirmation reply", but I think I'll go hunt it down and kill it instead..)
JP, next time you're up in the 'Pacific Northwet', you're not gonna be able to buy a beer..
Title: Re: [SOLVED] Help on Post/reply by email
Post by: JPalmer on November 17, 2020, 05:42:30 pm
Quote from: Steeley – YESSSSSSSS.... that does indeed solve the email reply posting problem.
Perversely however, now that email replies are posting, the sender gets a Mail-Delivery Failed message piped from emailpost.php.. (I could just tell users that's actually a "posting confirmation reply", but I think I'll go hunt it down and kill it instead..)
JP, next time you're up in the 'Pacific Northwet', you're not gonna be able to buy a beer..
Deal! ;-)
Title: Re: [SOLVED] Help on Post/reply by email
Post by: Steeley on November 17, 2020, 06:53:34 pm