Re: Save a copy of emails sent with .NET SMTP client

Nicolas Hatier <[email protected]> Fri, 13 Jan 2017 16:47:48 -0500
Newsgroups gmane.mail.cgatepro.general
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--------------D804655FDABDF41D31EFF7C3
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: quoted-printable



Saving a copy is a mail client feature that's usually implemented using=20
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,=20
unfortunately, as I don't think you can base such an action on the=20
Reply-To header content.

If I was assigned to do this, I would probably use an IMAP library,=20
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=20
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=20
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=20
this problem.


*Nicolas Hatier, ing.* <[email protected]=20
<mailto:[email protected]>>
Niversoft id=C3=A9es 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=20
> 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=20
> folder.
> Order emails are sent through account [email protected]=20
> <mailto:[email protected]> (From address) and the Reply to address=20
> is set to [email protected] <mailto:[email protected]>
> So would like to have a rule, if from: [email protected]=20
> <mailto:[email protected]> then Store in [email protected]=20
> <mailto:[email protected]>/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
>


--------------D804655FDABDF41D31EFF7C3
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable

<html>
  <head>
    <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Ty=
pe">
  </head>
  <body bgcolor=3D"#FFFFFF" text=3D"#000000">
    <br>
    <br>
    Saving a copy is a mail client feature that's usually implemented
    using IMAP - it's not an SMTP feature at all. <br>
    So it makes sense it's not in the SMTP client library.<br>
    <br>
    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. <br>
    <br>
    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.<br>
    <br>
    A server rule could however be used to save all the outgoing
    messages in a single mailbox.<br>
    <br>
    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.<br>
    <br>
    Sorry, I don't think there's a straightforward and easy solution for
    this problem.<br>
    <br>
    <div class=3D"moz-signature"><br>
      <p><b>Nicolas Hatier, ing.</b> &lt;<a style=3D"text-decoration:none=
;
          color:inherit" href=3D"mailto:[email protected]">nic=
[email protected]</a>&gt;<br>
        Niversoft id=C3=A9es logicielles - <a style=3D"text-decoration:no=
ne;
          color:inherit" href=3D"http://www.niversoft.com">http://www.niv=
ersoft.com</a></p>
      <br>
      <br>
    </div>
    <div class=3D"moz-cite-prefix">On 2017-01-13 11:34, Robin Lewis wrote=
:<br>
    </div>
    <blockquote cite=3D"mid:[email protected]" type=3D"cite"=
>
      <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Du=
tf-8">
      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.
      <div class=3D"">So Im trying to work out how to do this with CGP
        rules.</div>
      <div class=3D"">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.</div>
      <div class=3D"">Order emails are sent through account <a
          moz-do-not-send=3D"true" href=3D"mailto:[email protected]"
          class=3D"">[email protected]</a>=C2=A0(From address) and the=
 Reply
        to address is set to <a moz-do-not-send=3D"true"
          href=3D"mailto:[email protected]" class=3D"">userx@mycompany.=
com</a>=C2=A0</div>
      <div class=3D"">So would like to have a rule, if from:=C2=A0<a
          moz-do-not-send=3D"true" href=3D"mailto:[email protected]"
          class=3D"">[email protected]</a>=C2=A0then Store in=C2=A0<a
          moz-do-not-send=3D"true" href=3D"mailto:[email protected]"
          class=3D"">[email protected]</a>/Sent Messages</div>
      <div class=3D"">(where userx is a variable IE Reply to address)</di=
v>
      <div class=3D"">Is this possible to do this with a server based rul=
e</div>
      <div class=3D"">Any suggestion welcome</div>
      <div class=3D""><br class=3D"">
      </div>
      <div class=3D"">Cheers</div>
      <div class=3D"">Robin</div>
      <div class=3D""><br class=3D"">
      </div>
      <div class=3D""><br class=3D"">
      </div>
      <div class=3D""><br class=3D"">
      </div>
      <div class=3D""><br class=3D"">
      </div>
      <div class=3D""><br class=3D"">
      </div>
      <div class=3D""><span style=3D"color: rgb(98, 98, 98); font-family:=

          Avenir; font-size: large; orphans: 2; widows: 2;" class=3D"">Ro=
bin
          Lewis</span><br class=3D"">
        <div class=3D"">
          <div class=3D"">
            <div apple-content-edited=3D"true" class=3D"">
              <div class=3D"">
                <div style=3D"orphans: 2; widows: 2;" class=3D""><font
                    class=3D"" face=3D"Avenir" color=3D"#626262">IT Manag=
er</font></div>
                <div style=3D"orphans: 2; widows: 2;" class=3D""><span
                    style=3D"color: rgb(32, 148, 0); font-family: Avenir;=
"
                    class=3D"">Primary Talent International</span></div>
                <div style=3D"orphans: 2; widows: 2;" class=3D""><span
                    style=3D"color: rgb(98, 98, 98); font-family: Avenir;=
"
                    class=3D"">+44 (0) 207 400 4500</span></div>
              </div>
            </div>
            <br class=3D"">
          </div>
        </div>
      </div>
    </blockquote>
    <br>
  </body>
</html>

--------------D804655FDABDF41D31EFF7C3--