Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>A couple of different ways to "back up" your email messages so they could be resent if necessary:</p> <ul> <li><p><strong>ProcMail.</strong> Depending on the MTA you're using, it would be easy enough to write a <a href="http://www.procmail.org/" rel="nofollow">ProcMail recipe</a> to archive messages as your MTA sends them. If you're using Exchange, the same can be done on the server side of things.</p></li> <li><p><strong>XML Serialization.</strong> After you create each instance of the <code>MailMessage</code> class, serialize it and store it, either in the file system, or in a database. Should be easy enough to rehydrate instance when needed.</p></li> <li><p><strong>Pickup Directory.</strong> The <code>SmtpClient</code> class can be configured to "send" messages to a "Pickup Directory." This is normally used in a configuration where the MTA (message transport agent) is configured to watch a particular directory. Sending mail then consists of dropping a file containing an <a href="http://tools.ietf.org/html/rfc2822" rel="nofollow">RFC 2822-compliant message</a> into the directory, where it will shortly get collected by the MTA and sent on its way. If no MTA is configured to watch the pickup directory, the mail message will just get dropped there and sit.</p> <p>This is a useful way of testing the app that does the mailing without involving a real MTA. People tend to get grumpy when they get slammed with junk messages.</p> <p>It's also a useful technique for archiving: Configure 2 <code>SmtpClient</code> instances in your program: one configured to talk to your MTA and the other configured to drop the message in a pickup directory. Post each <code>MailMessage</code> you create to both instances and you'll have your archive.</p></li> </ul> <p>Any one of these techniques should work for you. If you actually need to re-send the email, XML serialization might be the best option for you, as rehydrating an object instance is pretty trivial to do via XML serialization.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload