MailHeader.cs 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. //
  2. // System.Web.Mail.MailHeader.cs
  3. //
  4. // Author(s):
  5. // Per Arneng <[email protected]>
  6. //
  7. //
  8. using System;
  9. using System.Collections;
  10. using System.Collections.Specialized;
  11. namespace System.Web.Mail {
  12. // This class represents the header of a mail with
  13. // all the header fields.
  14. internal class MailHeader {
  15. protected NameValueCollection data = new NameValueCollection();
  16. public string To {
  17. get { return data[ "To" ]; }
  18. set { data[ "To" ] = value; }
  19. }
  20. public string From {
  21. get { return data[ "From" ]; }
  22. set { data[ "From" ] = value; }
  23. }
  24. public string Cc {
  25. get { return data[ "Cc" ]; }
  26. set { data[ "Cc" ] = value; }
  27. }
  28. public string Bcc {
  29. get { return data[ "Bcc" ]; }
  30. set { data[ "Bcc" ] = value; }
  31. }
  32. public string Subject {
  33. get { return data[ "Subject" ]; }
  34. set { data[ "Subject" ] = value; }
  35. }
  36. public string Importance {
  37. get { return data[ "Importance" ]; }
  38. set { data[ "Importance" ] = value; }
  39. }
  40. public string Priority {
  41. get { return data[ "Priority" ]; }
  42. set { data[ "Priority" ] = value; }
  43. }
  44. public string MimeVersion {
  45. get { return data[ "Mime-Version" ]; }
  46. set { data[ "Mime-Version" ] = value; }
  47. }
  48. public string ContentType {
  49. get { return data[ "Content-Type" ]; }
  50. set { data[ "Content-Type" ] = value; }
  51. }
  52. public string ContentTransferEncoding{
  53. get { return data[ "Content-Transfer-Encoding" ]; }
  54. set { data[ "Content-Transfer-Encoding" ] = value; }
  55. }
  56. public string ContentDisposition {
  57. get { return data[ "Content-Disposition" ]; }
  58. set { data[ "Content-Disposition" ] = value; }
  59. }
  60. public string ContentBase {
  61. get { return data[ "Content-Base" ]; }
  62. set { data[ "Content-Base" ] = value; }
  63. }
  64. public string ContentLocation {
  65. get { return data[ "Content-Location" ]; }
  66. set { data[ "Content-Location" ] = value; }
  67. }
  68. public NameValueCollection Data {
  69. get { return data; }
  70. }
  71. }
  72. }