Saving emails sent via Plone into the mailbox 'sent' folder

I am working with a developer (luke Brannon) to create a custom product. One of the actions of the product is to send emails using Plone the SMTP server defined in the Plone setup. Works great.

However, the sent emails aren't stored in the "Sent" folder of the email mailbox used the send the emails. I can get the email logs; however this doesn't give me any useful info

I checked with my host support, and they said: "Saving the emails in the sent folder is the responsibility of the email client. That is not something the mail server does on its own. You will need to configure Plone to save each email its sent folder."

I can envision a simple solution - when each email is sent, it is saved to a csv , or on a table in a page on plone, etc. This shows they were sent. However, this wouldn't be as useful as having them in the "Sent" folder. For example, I had people ask me to resend email; however, this only possible if they are in the Sent folder.

Suggestions on how to save to the Sent folder. Anything you can help me with, I'll pass on to Luke.

That can only be done via the IMAP protocol. There is no support in plone for this I believe but there is in Python so could write a plugin to do it.

This is completely unrelated with Plone. The SMTP server is not in charge for the target store location on any email server. On the other side you don't want manage user credentials for accessing other persons IMAP accounts within Plone.


Hi, thanks for the reply.

I realize SMTP only sends the email and I would need to direct it to a mail server to be able to access it.

My goal would be to simply have emails sent via the smtp to be "forwarded" to an email address on an email sever that is then accessible via webmail - not necessarily from within Plone. This allows the admin (or anyone with webmail login) to determine if the emails went out, see actual content, and resend if needed.

I see this as beneficial for what I am doing, not sure how widespread the use would be.

If I proceed and am successful, I'll post back here.

Thanks again for your comments

Mail servers have lots of ways to determine what to do with an outgoing message.

It is standard that important information about outgoing messages is logged. Thus, you could make a view to the logfile available to your web environment. It would show when and to whom a message was sent (but not the message content).

Depending on the mail server, you may also be able to sent a copy of an outgoing message to a additional address.

1 Like

isn't what you're looking for, for devel/debug purposes?

Hi @polyester.

I tested this and it works as advertised - emails added to the log and forwarded to another email. Thanks for the tip.

I've contacted @mauritsvanrees with a question (specially the admonition not to use this on a production server.

It prevents sending any email. I don't think you want to use this in production :smiley: