2
0

MailMessage.cs 2.0 KB

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