2
How to get mail sent programmatically to also show up in Sent Items folder
Question asked by Brian - 2/24/2023 at 9:40 AM
Answered
I'm on Build 8251 of SmarterMail if it makes any difference.

I have several automated notification processes where I have C# code that connects to my SmarterMail server and sends email.  I've noticed that when I do that, those items don't show up in the Sent Items folder.  They only show up in sent items if you use an email client like Outlook or send items thru the web interface.

Is there a setting I can change that controls that?  Or is there something I need to do in my code to indicate to the server that I want the message to show up in Sent Items?

4 Replies

Reply to Thread
0
Brian Replied
I should also say, one of these automated processes isn't completely controlled by me (QuickBooks Desktop sending invoice emails).  So preferably this is something I can configure on the SmarterMail side, preferably on a per account basis.
0
This can be a good added option!

Maybe a per user enable/disable option to save in "sent items" folder a copy of every mail sent via SMTP protocol by a remote client software
Gabriele Maoret - Head of SysAdmins at SERSIS Currently manages 6 SmarterMail installations (1 in the cloud for SERSIS which provides services to a few hundred third-party email domains + 5 on-premise for customers who prefer to have their mail server in-house)
0
Brian Replied
Marked As Answer
Just wanted to follow up on this in case it helps anyone else...

Please forgive me, I write software, and am an "email administrator" (if you can call me that) by necessity.

So after some research, it appears that SMTP has no mechanism to put mail in a "Sent Items" folder.  That is the job of IMAP.  So our email clients that we use to create an email and send it, actually send the email via SMTP, then use IMAP to store a copy of the email in the "Sent Items" folder.  I had no idea that my messages had to be sent to the server twice, using two different protocols, every time I sent an email.  Now I know.

Really, you probably wouldn't want an option like I am asking about.  If you mixed and matched how mail was sent (sometimes from an email client, sometimes from automated code), then when you sent from your email client you would end up with TWO copies of that message in your "Sent Items" folder.  Once because the email client added it, and a second because this proposed setting would add it.

My solution is going to be, in addition to sending the email via SMTP, I'm also going to save a copy in the "Sent Items" folder using IMAP (using code).  This should work fine and get me the results I desire.
0
Reto Replied
Another solution would be to activate plus addressing on the mailbox (if the server supports it, sm does) and make a bcc to email+Sent_Items@domain.ext 

Reply to Thread