Hi Jesper.
Storing outgoing emails in your “Sent” folder is up to your SMTP server configuration, not the plugin.
Speaking about undelivered emails – there is no way a plugin can do this. The only thing it potential can do is store undelivered emails that failed due to invalid SMTP configuration. But if SMTP server says email is sent and then it gone missing somewhere in the process of delivering it to the receipt – this is not something WP plugin can detect.
Reply from siteground:
This is a test email option of your plugin and unfortunately, all the emails that you sent with it will not persist in your sent folder.
It seems that this plugin doesn’t support that kind of option. it only for SMTP authorization and send outgoing emails via an SMTP server.
Unfortunately, there is no alternative way in order to make your SMTP plugin to store emails in your sent folder.
—-
what to do?
When I browse on the net I find articles saying it is the smtp client that should save in the sent folder not the server.
Also when using outlook the sent mails always goes to the sent folder, so I think it is not a server configuration… will you investigate and reconsider?
Siteground elaborated, and again I found a lot of post saying that the smtp server does not have an option to save in sent folder, but only the client can do that. Takke a look her https://www.example-code.com/phpext/smtp_sendWithCopyToSentFolder.asp
If you still disagre, can you the refer me to one of your many plugin installs where they actual have an email in their sent folder? Or just in case I am mistaken, and siteground is mistaken, please give me a link to where to find this configuration on the smtp server.
If it is a matter of time, I am willing to pay you to implement this.
Apologies, probably I haven’t made my statement clear.
SMTP protocol is not the one that handles saving emails to “Sent” folder. There is no specifications in the protocol itself that makes it possible even. It just relays emails.
IMAP protocol is the one that handles this kind of stuff. Even the example code you provided clearly shows IMAP is being used to do this.
The reason I mentioned that this should be done server-side is because Google is doing this by default in Gmail. If you use Gmail SMTP, it would save outgoing messages into “Sent” folder automatically. Siteground can do this as well if needed, but they won’t as this does not make much sense for them 😉
Anyway, I have researched this topic a bit and figured it could be actually implemented into the plugin, but as a separate addon, as it would require php-imap extension to be installed (which is not installed by default on many servers).
I use imap on my outlook and phone to get emails, so it would work for my server. I think all email servers support imap these days. Could it be implemented as an option to ‘use imap with save to sent folder’?