Skip to main content
Topic: [SOLVED]Email Attachments attached to Wrong Post.. (Read 1687 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: Email Attachments attached to Wrong Post..

Reply #15
Post By Email

Ah.. my guess was "public beta environment " in ref to v 1.1.7...  Thanks!   :P
__________________________________________________________________________
// Deep inside every dilemma lies a solution that involves explosives //

 

Re: Email Attachments attached to Wrong Post..

Reply #16
Back to the issue of this topic ...

There are two things here ... One is what was identified, that the post id should be set to zero such that they are processed but not yet owned by an existing message. 

Then on successful new message/reply creation, we need to also ```bindMessageAttachments``` to have the new message own the new attachments.  I have it fixed on my local.
Be safe, Be kind, Happy Programing

Re: Email Attachments attached to Wrong Post..

Reply #17
Back to the issue of this topic ...

There are two things here ... One is what was identified, that the post id should be set to zero such that they are processed but not yet owned by an existing message. 

Then on successful new message/reply creation, we need to also ```bindMessageAttachments``` to have the new message own the new attachments.  I have it fixed on my local.

Yessir - didn't uncover the second until I looked at the code and database after the first was pinpointed by emanuale.
That is indeed outstanding news Spuds.  Email without an attachment is like Ray Charles at the Musée du Louvre.  ::)
If you can post the patch, or email it to me, I'll happily "beta test" it on my site..

__________________________________________________________________________
// Deep inside every dilemma lies a solution that involves explosives //

Re: Email Attachments attached to Wrong Post..

Reply #18
Will do ... I'm actually making several changes as I saw some other opportunity --- or I'm off in the weeds :P

Either way I'll post the files to try when available, just save/rename your existing files in case you need to back out of the test!
Be safe, Be kind, Happy Programing

Re: Email Attachments attached to Wrong Post..

Reply #19
Will do ... I'm actually making several changes as I saw some other opportunity --- or I'm off in the weeds :P

Either way I'll post the files to try when available, just save/rename your existing files in case you need to back out of the test!

Roger that...  just comment your changes so I know which ones to back out  :D  without dif'ing the files and guessing what is for what. .

., (and if you find my turtle let me know..)
__________________________________________________________________________
// Deep inside every dilemma lies a solution that involves explosives //

Re: Email Attachments attached to Wrong Post..

Reply #20
Here are the changes .... for the attachment problem you need to save and replace (2) files
first in /sources/subs Emailpost.subs.php and then in /sources/controllers Emailpost.controller.php  Just to note this will not inline any attachments no matter how the email arrives, all attachments are done as below the post style. 

I also made some changes to the email parser that separate to the attachment issue.  This version should be a little lighter on the memory in some cases, it also does a better job at selecting the best representation of the email should it be a multipart style which most are.  See: EmailParse.class.php

And last up are some changes to the html2md class which is used during outbound emails.  This should improve the link length problem that was discussed in another thread, but while addressing that issue is when I noticed that some changes were needed to the above email parser.  So again in sources/subs Html2Md.class.php

Remember to save your old files, just do a rename to .sav and then place these new files in the right directories.
Be safe, Be kind, Happy Programing

Re: Email Attachments attached to Wrong Post..

Reply #21
Here are the changes .... for the attachment problem you need to save and replace (2) files
first in /sources/subs Emailpost.subs.php and then in /sources/controllers Emailpost.controller.php  Just to note this will not inline any attachments no matter how the email arrives, all attachments are done as below the post style. 

I also made some changes to the email parser that separate to the attachment issue.  This version should be a little lighter on the memory in some cases, it also does a better job at selecting the best representation of the email should it be a multipart style which most are.  See: EmailParse.class.php

And last up are some changes to the html2md class which is used during outbound emails.  This should improve the link length problem that was discussed in another thread, but while addressing that issue is when I noticed that some changes were needed to the above email parser.  So again in sources/subs Html2Md.class.php

Remember to save your old files, just do a rename to .sav and then place these new files in the right directories.


Looks good so far, Spuds - I've tested new posts, replies, even handles "in-lines" (with a placeholder and attaching the file as normal which is good enough).

I'll flag @JPalmer as it looks like you worked over some of his code changes in the course of your efforts too. I think he was also fussing over the html line length issue.
He'll have to test that out for joy, mine is profuse..  thanks!
 
__________________________________________________________________________
// Deep inside every dilemma lies a solution that involves explosives //