Emails are not getting saved in the Sent folder!

Email’s sent via the email module compose are not getting saved in the Sent folder.

I have captured the following logs right after sending a test mail:

Sun Jun 11 10:54:17 2023 [9208][a9d61101-30c5-40d7-8128-587a4f72fb34][ERROR] fromUser: Conversion of from user format m/d/Y H:i failed
Sun Jun 11 10:54:17 2023 [9208][a9d61101-30c5-40d7-8128-587a4f72fb34][ERROR] Saving Email with invalid From name and/or Address. Details:
From field is not set.
From-name is not set.
From name is empty.
From address and name pair is empty.
codes:1, 7, 11, 14
Sun Jun 11 10:54:17 2023 [9208][a9d61101-30c5-40d7-8128-587a4f72fb34][ERROR] Unable to find relationship emails_email_templates
Sun Jun 11 10:54:17 2023 [9208][a9d61101-30c5-40d7-8128-587a4f72fb34][ERROR] Invalid email from address or name detected before sending. Details:
From field is not set.
From-name is not set.
From name is not set.
From address and name pair is empty.
codes:1, 7, 10, 14

Sun Jun 11 10:54:17 2023 [9208][a9d61101-30c5-40d7-8128-587a4f72fb34][ERROR] Saving Email with invalid From name and/or Address. Details:
From field is not set.
From address is not set.
From-name is not set.
From name is not set.
From address and name pair is empty.
codes:1, 4, 7, 10, 14
Sun Jun 11 10:54:17 2023 [9208][a9d61101-30c5-40d7-8128-587a4f72fb34][ERROR] Unable to find relationship emails_email_templates
Sun Jun 11 10:54:17 2023 [9208][a9d61101-30c5-40d7-8128-587a4f72fb34][ERROR] Saving Email with invalid From name and/or Address. Details:
From field is not set.
From address is not set.
From-name is not set.
From name is not set.
From address and name pair is empty.
codes:1, 4, 7, 10, 14
Sun Jun 11 10:54:17 2023 [9208][a9d61101-30c5-40d7-8128-587a4f72fb34][ERROR] Unable to find relationship emails_email_templates
Sun Jun 11 10:54:17 2023 [9208][a9d61101-30c5-40d7-8128-587a4f72fb34][ERROR] fromUser: Conversion of from user format m/d/Y H:i failed
Sun Jun 11 10:54:17 2023 [9208][a9d61101-30c5-40d7-8128-587a4f72fb34][ERROR] Saving Email with invalid From name and/or Address. Details:
From field is not set.
From-name is not set.
From name is not set.
From address and name pair is empty.
codes:1, 7, 10, 14
Sun Jun 11 10:54:17 2023 [9208][a9d61101-30c5-40d7-8128-587a4f72fb34][ERROR] Unable to find relationship emails_email_templates
Sun Jun 11 10:54:17 2023 [9208][a9d61101-30c5-40d7-8128-587a4f72fb34][ERROR] Array
(
[0] => Unhandled email save and store as sent error: 0
[1] => 6
)

Sun Jun 11 10:54:19 2023 [9208][a9d61101-30c5-40d7-8128-587a4f72fb34][ERROR] Unable to find relationship emails_email_templates

I have added Inbound and Outbound account exactly as per the documentation. Emails are getting sent and correct from and emails are showing to the recipient. But they don’t get saved in the Sent folder.

Is this a known issue? Is there any resolution to this?

Did you have it ever working?

Mail Servers (postfix, etc.) normally do not save outgoing emails into Sent Folder.
So it means creating of a record in Sent Folder is a obligation of Mail Client.
In other words if outgoing email is not saved into Sent Folder such a functionality is not implemented in the used software.

P.S.
I just got into the same issue.
So I think there are 2 options: make a feature request and install some plugin (if it’s exist)

IIRC the Email module was originally developed with GMail as the test mail server. And, GMail automatically saves outgoing mail to the Sent Mail folder. It looks like saving outgoing mail messages to the Sent Items folder, for all mail servers except GMail, was overlooked for this reason. This needs a new Issue (bug) on Github, and a new Feature Request post on the Feedback subforum.

1 Like

I’ve looked into the source code…
So actually there is a call intended to save outgoing emails into Sent folder.
Unfortunately, I don’t a time now to debug it… however, it looks like the actual append code to Send Folder is never reached.
So, I assume, you’re right. That’s a bug and should be reported.

The error messages are telling you what is missing - From name or from email configs in your account settings.

There are no errors in the logs. All configs are in place.