SmtpMessage.cs 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. using System;
  2. using System.Collections;
  3. using System.Text;
  4. namespace System.Web.Mail {
  5. internal class SmtpMessage {
  6. private IList attachments;
  7. private MailAddressCollection bcc;
  8. private string body;
  9. private Encoding bodyEncoding;
  10. private MailFormat bodyFormat;
  11. private MailAddressCollection cc;
  12. private MailAddress from;
  13. private IDictionary headers;
  14. private MailPriority priority;
  15. private string subject;
  16. private MailAddressCollection to;
  17. private string urlContentBase;
  18. private string urlContentLocation;
  19. // Constructor
  20. public SmtpMessage ()
  21. {
  22. attachments = new ArrayList (8);
  23. headers = new Hashtable ();
  24. to = new MailAddressCollection();
  25. cc = new MailAddressCollection();
  26. bcc = new MailAddressCollection();
  27. }
  28. // Properties
  29. public IList Attachments {
  30. get { return attachments; }
  31. set { attachments = value; }
  32. }
  33. public MailAddressCollection Bcc {
  34. get { return bcc; }
  35. set { bcc = value; }
  36. }
  37. public string Body {
  38. get { return body; }
  39. set { body = value; }
  40. }
  41. public Encoding BodyEncoding {
  42. get { return bodyEncoding; }
  43. set { bodyEncoding = value; }
  44. }
  45. public MailFormat BodyFormat {
  46. get { return bodyFormat; }
  47. set { bodyFormat = value; }
  48. }
  49. public MailAddressCollection Cc {
  50. get { return cc; }
  51. set { cc = value; }
  52. }
  53. public MailAddress From {
  54. get { return from; }
  55. set { from = value; }
  56. }
  57. public IDictionary Headers {
  58. get { return headers; }
  59. set { headers = value; }
  60. }
  61. public MailPriority Priority {
  62. get { return priority; }
  63. set { priority = value; }
  64. }
  65. public string Subject {
  66. get { return subject; }
  67. set { subject = value; }
  68. }
  69. public MailAddressCollection To {
  70. get { return to; }
  71. set { to = value; }
  72. }
  73. public string UrlContentBase {
  74. get { return urlContentBase; }
  75. set { urlContentBase = value; }
  76. }
  77. public string UrlContentLocation {
  78. get { return urlContentLocation; }
  79. set { urlContentLocation = value; }
  80. }
  81. }
  82. }