Emails sent from within SuiteCRM have mis-matched boundary ids on copy in sent folder. #5093
When I send an email from within SuiteCRM, the copy that is saved to my sent folder on my IMAP server is either gibberish or completely blank depending on which mail agent I'm using. In looking at the source for the copy in the Sent folder the boundary id in the header does not match the boundary ids used below. The email sent to the recipient is correct, it is just the Sent copy that is wrong.
Here is an example of an email:
The boundary ID in the header should match the boundary IDs used in the parts of the body.
The boundary ID in the email header:
does not match the boundary ids used in the body of the message:
Steps to Reproduce
I feel this should be a medium priority issue. It does not prevent the emails from being sent but it makes it impossible to reference the sent emails in your own email program.
I believe I have found the issue. The problem is in modules/Emails/Email.php on this line (972 in 7.8 or 1287 in master):
New boundaries are generated inside of CreateBody so the boundary id used in the header is no longer valid. My fix is to change the line to this: