Mailing List CGatePro@mail.stalker.com Message #106310
From: Nicolas Hatier <nicolas.hatier@niversoft.com>
Subject: Re: Save a copy of emails sent with .NET SMTP client
Date: Fri, 13 Jan 2017 16:47:48 -0500
To: CommuniGate Pro Discussions <CGatePro@mail.stalker.com>


Saving a copy is a mail client feature that's usually implemented using IMAP - it's not an SMTP feature at all.
So it makes sense it's not in the SMTP client library.

And you will probably not be able to do that using CGP rules, unfortunately, as I don't think you can base such an action on the Reply-To header content.

If I was assigned to do this, I would probably use an IMAP library, connect with an user/password that have MASTER rights or rights to write into user mailboxes, then save a copy of the message there. But that also means creating the message structure itself as, if I don't remember the NET SMTP class or the MailMessage class having a method to get the generated message structure.

A server rule could however be used to save all the outgoing messages in a single mailbox.

Or an external filter could be written ti intercept the message, analyze its content, get the Reply-To header and use IMAP to store a copy in the correct location.

Sorry, I don't think there's a straightforward and easy solution for this problem.


Nicolas Hatier, ing. <nicolas.hatier@niversoft.com>
Niversoft idées logicielles - http://www.niversoft.com



On 2017-01-13 11:34, Robin Lewis wrote:
Im trying to save a copy of emails sent via .NET SMTP client in users Sent folder, This feature seems missing from .NET SMTP client.
So Im trying to work out how to do this with CGP rules.
We have a web app (.NET) which generates email orders and sends to 3rd parties, works well. But would like to save a copy in the users sent folder.
Order emails are sent through account orders@mycompany.com (From address) and the Reply to address is set to userx@mycompany.com 
So would like to have a rule, if from: orders@mycompany.com then Store in userx@mycompany.com/Sent Messages
(where userx is a variable IE Reply to address)
Is this possible to do this with a server based rule
Any suggestion welcome

Cheers
Robin





Robin Lewis
IT Manager
Primary Talent International
+44 (0) 207 400 4500


Subscribe (FEED) Subscribe (DIGEST) Subscribe (INDEX) Unsubscribe Mail to Listmaster