scripts
This commit is contained in:
@@ -0,0 +1,224 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Net.Mime;
|
||||
using System.Text;
|
||||
|
||||
namespace System.Net.Mail
|
||||
{
|
||||
/// <summary>Represents the format to view an email message.</summary>
|
||||
// Token: 0x02000135 RID: 309
|
||||
public class AlternateView : AttachmentBase
|
||||
{
|
||||
/// <summary>Initializes a new instance of <see cref="T:System.Net.Mail.AlternateView" /> with the specified file name.</summary>
|
||||
/// <param name="fileName">The name of the file that contains the content for this alternate view.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="fileName" /> is null.</exception>
|
||||
/// <exception cref="T:System.Security.SecurityException">The caller does not have the required permission.</exception>
|
||||
/// <exception cref="T:System.IO.IOException">An I/O error occurred, such as a disk error.</exception>
|
||||
/// <exception cref="T:System.UnauthorizedAccessException">The access requested is not permitted by the operating system for the specified file handle, such as when access is Write or ReadWrite and the file handle is set for read-only access.</exception>
|
||||
// Token: 0x06000A82 RID: 2690 RVA: 0x0001DA6C File Offset: 0x0001BC6C
|
||||
public AlternateView(string fileName)
|
||||
: base(fileName)
|
||||
{
|
||||
if (fileName == null)
|
||||
{
|
||||
throw new ArgumentNullException();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of <see cref="T:System.Net.Mail.AlternateView" /> with the specified file name and content type.</summary>
|
||||
/// <param name="fileName">The name of the file that contains the content for this alternate view.</param>
|
||||
/// <param name="contentType">The type of the content.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="fileName" /> is null.</exception>
|
||||
/// <exception cref="T:System.FormatException">
|
||||
/// <paramref name="contentType" /> is not a valid value.</exception>
|
||||
/// <exception cref="T:System.Security.SecurityException">The caller does not have the required permission.</exception>
|
||||
/// <exception cref="T:System.IO.IOException">An I/O error occurred, such as a disk error.</exception>
|
||||
/// <exception cref="T:System.UnauthorizedAccessException">The access requested is not permitted by the operating system for the specified file handle, such as when access is Write or ReadWrite and the file handle is set for read-only access.</exception>
|
||||
// Token: 0x06000A83 RID: 2691 RVA: 0x0001DA8C File Offset: 0x0001BC8C
|
||||
public AlternateView(string fileName, global::System.Net.Mime.ContentType contentType)
|
||||
: base(fileName, contentType)
|
||||
{
|
||||
if (fileName == null)
|
||||
{
|
||||
throw new ArgumentNullException();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of <see cref="T:System.Net.Mail.AlternateView" /> with the specified file name and media type.</summary>
|
||||
/// <param name="fileName">The name of the file that contains the content for this alternate view.</param>
|
||||
/// <param name="mediaType">The MIME media type of the content.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="fileName" /> is null.</exception>
|
||||
/// <exception cref="T:System.FormatException">
|
||||
/// <paramref name="mediaType" /> is not a valid value.</exception>
|
||||
/// <exception cref="T:System.Security.SecurityException">The caller does not have the required permission.</exception>
|
||||
/// <exception cref="T:System.IO.IOException">An I/O error occurred, such as a disk error.</exception>
|
||||
/// <exception cref="T:System.UnauthorizedAccessException">The access requested is not permitted by the operating system for the specified file handle, such as when access is Write or ReadWrite and the file handle is set for read-only access.</exception>
|
||||
// Token: 0x06000A84 RID: 2692 RVA: 0x0001DAB0 File Offset: 0x0001BCB0
|
||||
public AlternateView(string fileName, string mediaType)
|
||||
: base(fileName, mediaType)
|
||||
{
|
||||
if (fileName == null)
|
||||
{
|
||||
throw new ArgumentNullException();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of <see cref="T:System.Net.Mail.AlternateView" /> with the specified <see cref="T:System.IO.Stream" />.</summary>
|
||||
/// <param name="contentStream">A stream that contains the content for this view.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="contentStream" /> is null.</exception>
|
||||
// Token: 0x06000A85 RID: 2693 RVA: 0x0001DAD4 File Offset: 0x0001BCD4
|
||||
public AlternateView(Stream contentStream)
|
||||
: base(contentStream)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of <see cref="T:System.Net.Mail.AlternateView" /> with the specified <see cref="T:System.IO.Stream" /> and media type.</summary>
|
||||
/// <param name="contentStream">A stream that contains the content for this attachment.</param>
|
||||
/// <param name="mediaType">The MIME media type of the content.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="contentStream" /> is null.</exception>
|
||||
/// <exception cref="T:System.FormatException">
|
||||
/// <paramref name="mediaType" /> is not a valid value.</exception>
|
||||
// Token: 0x06000A86 RID: 2694 RVA: 0x0001DAE8 File Offset: 0x0001BCE8
|
||||
public AlternateView(Stream contentStream, string mediaType)
|
||||
: base(contentStream, mediaType)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of <see cref="T:System.Net.Mail.AlternateView" /> with the specified <see cref="T:System.IO.Stream" /> and <see cref="T:System.Net.Mime.ContentType" />.</summary>
|
||||
/// <param name="contentStream">A stream that contains the content for this attachment.</param>
|
||||
/// <param name="contentType">The type of the content.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="contentStream" /> is null.</exception>
|
||||
/// <exception cref="T:System.FormatException">
|
||||
/// <paramref name="contentType" /> is not a valid value.</exception>
|
||||
// Token: 0x06000A87 RID: 2695 RVA: 0x0001DB00 File Offset: 0x0001BD00
|
||||
public AlternateView(Stream contentStream, global::System.Net.Mime.ContentType contentType)
|
||||
: base(contentStream, contentType)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the Base URI to use for resolving relative URIs in the <see cref="T:System.Net.Mail.AlternateView" />.</summary>
|
||||
/// <returns>A <see cref="T:System.Uri" />.</returns>
|
||||
// Token: 0x170002AB RID: 683
|
||||
// (get) Token: 0x06000A88 RID: 2696 RVA: 0x0001DB18 File Offset: 0x0001BD18
|
||||
// (set) Token: 0x06000A89 RID: 2697 RVA: 0x0001DB20 File Offset: 0x0001BD20
|
||||
public global::System.Uri BaseUri
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.baseUri;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.baseUri = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the set of embedded resources referred to by this attachment.</summary>
|
||||
/// <returns>A <see cref="T:System.Net.Mail.LinkedResourceCollection" /> object that stores the collection of linked resources to be sent as part of an e-mail message.</returns>
|
||||
// Token: 0x170002AC RID: 684
|
||||
// (get) Token: 0x06000A8A RID: 2698 RVA: 0x0001DB2C File Offset: 0x0001BD2C
|
||||
public LinkedResourceCollection LinkedResources
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.linkedResources;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Creates a <see cref="T:System.Net.Mail.AlternateView" /> of an email message using the content specified in a <see cref="System.String" />.</summary>
|
||||
/// <returns>An <see cref="T:System.Net.Mail.AlternateView" /> object that represents an alternate view of an email message.</returns>
|
||||
/// <param name="content">The <see cref="T:System.String" /> that contains the content of the email message.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="content" /> is null.</exception>
|
||||
// Token: 0x06000A8B RID: 2699 RVA: 0x0001DB34 File Offset: 0x0001BD34
|
||||
public static AlternateView CreateAlternateViewFromString(string content)
|
||||
{
|
||||
if (content == null)
|
||||
{
|
||||
throw new ArgumentNullException();
|
||||
}
|
||||
MemoryStream memoryStream = new MemoryStream(Encoding.UTF8.GetBytes(content));
|
||||
return new AlternateView(memoryStream)
|
||||
{
|
||||
TransferEncoding = global::System.Net.Mime.TransferEncoding.QuotedPrintable
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>Creates an <see cref="T:System.Net.Mail.AlternateView" /> of an email message using the content specified in a <see cref="System.String" /> and the specified MIME media type of the content.</summary>
|
||||
/// <returns>An <see cref="T:System.Net.Mail.AlternateView" /> object that represents an alternate view of an email message.</returns>
|
||||
/// <param name="content">A <see cref="T:System.String" /> that contains the content for this attachment.</param>
|
||||
/// <param name="contentType">A <see cref="T:System.Net.Mime.ContentType" /> that describes the data in <paramref name="string" />.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="content" /> is null.</exception>
|
||||
// Token: 0x06000A8C RID: 2700 RVA: 0x0001DB70 File Offset: 0x0001BD70
|
||||
public static AlternateView CreateAlternateViewFromString(string content, global::System.Net.Mime.ContentType contentType)
|
||||
{
|
||||
if (content == null)
|
||||
{
|
||||
throw new ArgumentNullException("content");
|
||||
}
|
||||
Encoding encoding = ((contentType.CharSet == null) ? Encoding.UTF8 : Encoding.GetEncoding(contentType.CharSet));
|
||||
MemoryStream memoryStream = new MemoryStream(encoding.GetBytes(content));
|
||||
return new AlternateView(memoryStream, contentType)
|
||||
{
|
||||
TransferEncoding = global::System.Net.Mime.TransferEncoding.QuotedPrintable
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>Creates an <see cref="T:System.Net.Mail.AlternateView" /> of an email message using the content specified in a <see cref="System.String" />, the specified text encoding, and MIME media type of the content.</summary>
|
||||
/// <returns>An <see cref="T:System.Net.Mail.AlternateView" /> object that represents an alternate view of an email message.</returns>
|
||||
/// <param name="content">A <see cref="T:System.String" /> that contains the content for this attachment.</param>
|
||||
/// <param name="contentEncoding">An <see cref="T:System.Text.Encoding" />. This value can be null.</param>
|
||||
/// <param name="mediaType">The MIME media type of the content.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="content" /> is null.</exception>
|
||||
// Token: 0x06000A8D RID: 2701 RVA: 0x0001DBCC File Offset: 0x0001BDCC
|
||||
public static AlternateView CreateAlternateViewFromString(string content, Encoding encoding, string mediaType)
|
||||
{
|
||||
if (content == null)
|
||||
{
|
||||
throw new ArgumentNullException("content");
|
||||
}
|
||||
if (encoding == null)
|
||||
{
|
||||
encoding = Encoding.UTF8;
|
||||
}
|
||||
MemoryStream memoryStream = new MemoryStream(encoding.GetBytes(content));
|
||||
return new AlternateView(memoryStream, new global::System.Net.Mime.ContentType
|
||||
{
|
||||
MediaType = mediaType,
|
||||
CharSet = encoding.HeaderName
|
||||
})
|
||||
{
|
||||
TransferEncoding = global::System.Net.Mime.TransferEncoding.QuotedPrintable
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>Releases the unmanaged resources used by the <see cref="T:System.Net.Mail.AlternateView" /> and optionally releases the managed resources. </summary>
|
||||
/// <param name="disposing">true to release both managed and unmanaged resources; false to release only unmanaged resources. </param>
|
||||
// Token: 0x06000A8E RID: 2702 RVA: 0x0001DC30 File Offset: 0x0001BE30
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing)
|
||||
{
|
||||
foreach (LinkedResource linkedResource in this.linkedResources)
|
||||
{
|
||||
linkedResource.Dispose();
|
||||
}
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
// Token: 0x04000AF7 RID: 2807
|
||||
private global::System.Uri baseUri;
|
||||
|
||||
// Token: 0x04000AF8 RID: 2808
|
||||
private LinkedResourceCollection linkedResources = new LinkedResourceCollection();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
using System;
|
||||
using System.Collections.ObjectModel;
|
||||
|
||||
namespace System.Net.Mail
|
||||
{
|
||||
/// <summary>Represents a collection of <see cref="T:System.Net.Mail.AlternateView" /> objects.</summary>
|
||||
// Token: 0x02000136 RID: 310
|
||||
public sealed class AlternateViewCollection : Collection<AlternateView>, IDisposable
|
||||
{
|
||||
// Token: 0x06000A8F RID: 2703 RVA: 0x0001DCA0 File Offset: 0x0001BEA0
|
||||
internal AlternateViewCollection()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Releases all resources used by the <see cref="T:System.Net.Mail.AlternateViewCollection" />.</summary>
|
||||
// Token: 0x06000A90 RID: 2704 RVA: 0x0001DCA8 File Offset: 0x0001BEA8
|
||||
public void Dispose()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06000A91 RID: 2705 RVA: 0x0001DCAC File Offset: 0x0001BEAC
|
||||
protected override void ClearItems()
|
||||
{
|
||||
base.ClearItems();
|
||||
}
|
||||
|
||||
// Token: 0x06000A92 RID: 2706 RVA: 0x0001DCB4 File Offset: 0x0001BEB4
|
||||
protected override void InsertItem(int index, AlternateView item)
|
||||
{
|
||||
base.InsertItem(index, item);
|
||||
}
|
||||
|
||||
// Token: 0x06000A93 RID: 2707 RVA: 0x0001DCC0 File Offset: 0x0001BEC0
|
||||
protected override void RemoveItem(int index)
|
||||
{
|
||||
base.RemoveItem(index);
|
||||
}
|
||||
|
||||
// Token: 0x06000A94 RID: 2708 RVA: 0x0001DCCC File Offset: 0x0001BECC
|
||||
protected override void SetItem(int index, AlternateView item)
|
||||
{
|
||||
base.SetItem(index, item);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,228 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Net.Mime;
|
||||
using System.Text;
|
||||
|
||||
namespace System.Net.Mail
|
||||
{
|
||||
/// <summary>Represents an attachment to an e-mail.</summary>
|
||||
// Token: 0x02000137 RID: 311
|
||||
public class Attachment : AttachmentBase
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Net.Mail.Attachment" /> class with the specified content string. </summary>
|
||||
/// <param name="fileName">A <see cref="T:System.String" /> that contains a file path to use to create this attachment.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="fileName" /> is null.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="fileName" /> is empty.</exception>
|
||||
// Token: 0x06000A95 RID: 2709 RVA: 0x0001DCD8 File Offset: 0x0001BED8
|
||||
public Attachment(string fileName)
|
||||
: base(fileName)
|
||||
{
|
||||
this.InitName(fileName);
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Net.Mail.Attachment" /> class with the specified content string and MIME type information. </summary>
|
||||
/// <param name="fileName">A <see cref="T:System.String" /> that contains the content for this attachment.</param>
|
||||
/// <param name="mediaType">A <see cref="T:System.String" /> that contains the MIME Content-Header information for this attachment. This value can be null.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="fileName" /> is null.</exception>
|
||||
/// <exception cref="T:System.FormatException">
|
||||
/// <paramref name="mediaType" /> is not in the correct format.</exception>
|
||||
// Token: 0x06000A96 RID: 2710 RVA: 0x0001DCF4 File Offset: 0x0001BEF4
|
||||
public Attachment(string fileName, string mediaType)
|
||||
: base(fileName, mediaType)
|
||||
{
|
||||
this.InitName(fileName);
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Net.Mail.Attachment" /> class with the specified content string and <see cref="T:System.Net.Mime.ContentType" />.</summary>
|
||||
/// <param name="fileName">A <see cref="T:System.String" /> that contains a file path to use to create this attachment.</param>
|
||||
/// <param name="contentType">A <see cref="T:System.Net.Mime.ContentType" /> that describes the data in <paramref name="string" />.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="fileName" /> is null.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="mediaType" /> is not in the correct format.</exception>
|
||||
// Token: 0x06000A97 RID: 2711 RVA: 0x0001DD10 File Offset: 0x0001BF10
|
||||
public Attachment(string fileName, global::System.Net.Mime.ContentType contentType)
|
||||
: base(fileName, contentType)
|
||||
{
|
||||
this.InitName(fileName);
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Net.Mail.Attachment" /> class with the specified stream and content type. </summary>
|
||||
/// <param name="contentStream">A readable <see cref="T:System.IO.Stream" /> that contains the content for this attachment.</param>
|
||||
/// <param name="contentType">A <see cref="T:System.Net.Mime.ContentType" /> that describes the data in <paramref name="stream" />.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="contentType" /> is null.-or-<paramref name="contentStream" /> is null.</exception>
|
||||
// Token: 0x06000A98 RID: 2712 RVA: 0x0001DD2C File Offset: 0x0001BF2C
|
||||
public Attachment(Stream contentStream, global::System.Net.Mime.ContentType contentType)
|
||||
: base(contentStream, contentType)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Net.Mail.Attachment" /> class with the specified stream and name.</summary>
|
||||
/// <param name="contentStream">A readable <see cref="T:System.IO.Stream" /> that contains the content for this attachment.</param>
|
||||
/// <param name="name">A <see cref="T:System.String" /> that contains the value for the <see cref="P:System.Net.Mime.ContentType.Name" /> property of the <see cref="T:System.Net.Mime.ContentType" /> associated with this attachment. This value can be null.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="contentStream" /> is null.</exception>
|
||||
// Token: 0x06000A99 RID: 2713 RVA: 0x0001DD44 File Offset: 0x0001BF44
|
||||
public Attachment(Stream contentStream, string name)
|
||||
: base(contentStream)
|
||||
{
|
||||
this.Name = name;
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Net.Mail.Attachment" /> class with the specified stream, name, and MIME type information. </summary>
|
||||
/// <param name="contentStream">A readable <see cref="T:System.IO.Stream" /> that contains the content for this attachment.</param>
|
||||
/// <param name="name">A <see cref="T:System.String" /> that contains the value for the <see cref="P:System.Net.Mime.ContentType.Name" /> property of the <see cref="T:System.Net.Mime.ContentType" /> associated with this attachment. This value can be null.</param>
|
||||
/// <param name="mediaType">A <see cref="T:System.String" /> that contains the MIME Content-Header information for this attachment. This value can be null.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="stream" /> is null.</exception>
|
||||
/// <exception cref="T:System.FormatException">
|
||||
/// <paramref name="mediaType" /> is not in the correct format.</exception>
|
||||
// Token: 0x06000A9A RID: 2714 RVA: 0x0001DD60 File Offset: 0x0001BF60
|
||||
public Attachment(Stream contentStream, string name, string mediaType)
|
||||
: base(contentStream, mediaType)
|
||||
{
|
||||
this.Name = name;
|
||||
}
|
||||
|
||||
/// <summary>Gets the MIME content disposition for this attachment.</summary>
|
||||
/// <returns>A <see cref="T:System.Net.Mime.ContentDisposition" /> that provides the presentation information for this attachment. </returns>
|
||||
// Token: 0x170002AD RID: 685
|
||||
// (get) Token: 0x06000A9B RID: 2715 RVA: 0x0001DD7C File Offset: 0x0001BF7C
|
||||
public global::System.Net.Mime.ContentDisposition ContentDisposition
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.contentDisposition;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the MIME content type name value in the content type associated with this attachment.</summary>
|
||||
/// <returns>A <see cref="T:System.String" /> that contains the value for the content type <paramref name="name" /> represented by the <see cref="P:System.Net.Mime.ContentType.Name" /> property.</returns>
|
||||
/// <exception cref="T:System.ArgumentNullException">The value specified for a set operation is null.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">The value specified for a set operation is <see cref="F:System.String.Empty" /> ("").</exception>
|
||||
// Token: 0x170002AE RID: 686
|
||||
// (get) Token: 0x06000A9C RID: 2716 RVA: 0x0001DD84 File Offset: 0x0001BF84
|
||||
// (set) Token: 0x06000A9D RID: 2717 RVA: 0x0001DD94 File Offset: 0x0001BF94
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return base.ContentType.Name;
|
||||
}
|
||||
set
|
||||
{
|
||||
base.ContentType.Name = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Specifies the encoding for the <see cref="T:System.Net.Mail.Attachment" /><see cref="P:System.Net.Mail.Attachment.Name" />.</summary>
|
||||
/// <returns>An <see cref="T:System.Text.Encoding" /> value that specifies the type of name encoding. The default value is determined from the name of the attachment.</returns>
|
||||
// Token: 0x170002AF RID: 687
|
||||
// (get) Token: 0x06000A9E RID: 2718 RVA: 0x0001DDA4 File Offset: 0x0001BFA4
|
||||
// (set) Token: 0x06000A9F RID: 2719 RVA: 0x0001DDAC File Offset: 0x0001BFAC
|
||||
public Encoding NameEncoding
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.nameEncoding;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.nameEncoding = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Creates a mail attachment using the content from the specified string, and the specified <see cref="T:System.Net.Mime.ContentType" />.</summary>
|
||||
/// <returns>An object of type <see cref="T:System.Net.Mail.Attachment" />.</returns>
|
||||
/// <param name="content">A <see cref="T:System.String" /> that contains the content for this attachment.</param>
|
||||
/// <param name="contentType">A <see cref="T:System.Net.Mime.ContentType" /> object that represents the Multipurpose Internet Mail Exchange (MIME) protocol Content-Type header to be used.</param>
|
||||
// Token: 0x06000AA0 RID: 2720 RVA: 0x0001DDB8 File Offset: 0x0001BFB8
|
||||
public static Attachment CreateAttachmentFromString(string content, global::System.Net.Mime.ContentType contentType)
|
||||
{
|
||||
if (content == null)
|
||||
{
|
||||
throw new ArgumentNullException("content");
|
||||
}
|
||||
MemoryStream memoryStream = new MemoryStream();
|
||||
StreamWriter streamWriter = new StreamWriter(memoryStream);
|
||||
streamWriter.Write(content);
|
||||
streamWriter.Flush();
|
||||
memoryStream.Position = 0L;
|
||||
return new Attachment(memoryStream, contentType)
|
||||
{
|
||||
TransferEncoding = global::System.Net.Mime.TransferEncoding.QuotedPrintable
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>Creates a mail attachment using the content from the specified string, and the specified MIME content type name.</summary>
|
||||
/// <returns>An object of type <see cref="T:System.Net.Mail.Attachment" />.</returns>
|
||||
/// <param name="content">A <see cref="T:System.String" /> that contains the content for this attachment.</param>
|
||||
/// <param name="name">The MIME content type name value in the content type associated with this attachment.</param>
|
||||
// Token: 0x06000AA1 RID: 2721 RVA: 0x0001DE08 File Offset: 0x0001C008
|
||||
public static Attachment CreateAttachmentFromString(string content, string name)
|
||||
{
|
||||
if (content == null)
|
||||
{
|
||||
throw new ArgumentNullException("content");
|
||||
}
|
||||
MemoryStream memoryStream = new MemoryStream();
|
||||
StreamWriter streamWriter = new StreamWriter(memoryStream);
|
||||
streamWriter.Write(content);
|
||||
streamWriter.Flush();
|
||||
memoryStream.Position = 0L;
|
||||
return new Attachment(memoryStream, new global::System.Net.Mime.ContentType("text/plain"))
|
||||
{
|
||||
TransferEncoding = global::System.Net.Mime.TransferEncoding.QuotedPrintable,
|
||||
Name = name
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>Creates a mail attachment using the content from the specified string, the specified MIME content type name, character encoding, and MIME header information for the attachment.</summary>
|
||||
/// <returns>An object of type <see cref="T:System.Net.Mail.Attachment" />.</returns>
|
||||
/// <param name="content">A <see cref="T:System.String" /> that contains the content for this attachment.</param>
|
||||
/// <param name="name">The MIME content type name value in the content type associated with this attachment.</param>
|
||||
/// <param name="contentEncoding">An <see cref="T:System.Text.Encoding" />. This value can be null.</param>
|
||||
/// <param name="mediaType">A <see cref="T:System.String" /> that contains the MIME Content-Header information for this attachment. This value can be null.</param>
|
||||
// Token: 0x06000AA2 RID: 2722 RVA: 0x0001DE68 File Offset: 0x0001C068
|
||||
public static Attachment CreateAttachmentFromString(string content, string name, Encoding contentEncoding, string mediaType)
|
||||
{
|
||||
if (content == null)
|
||||
{
|
||||
throw new ArgumentNullException("content");
|
||||
}
|
||||
MemoryStream memoryStream = new MemoryStream();
|
||||
StreamWriter streamWriter = new StreamWriter(memoryStream, contentEncoding);
|
||||
streamWriter.Write(content);
|
||||
streamWriter.Flush();
|
||||
memoryStream.Position = 0L;
|
||||
return new Attachment(memoryStream, name, mediaType)
|
||||
{
|
||||
TransferEncoding = global::System.Net.Mime.ContentType.GuessTransferEncoding(contentEncoding),
|
||||
ContentType =
|
||||
{
|
||||
CharSet = streamWriter.Encoding.BodyName
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// Token: 0x06000AA3 RID: 2723 RVA: 0x0001DED8 File Offset: 0x0001C0D8
|
||||
private void InitName(string fileName)
|
||||
{
|
||||
if (fileName == null)
|
||||
{
|
||||
throw new ArgumentNullException("fileName");
|
||||
}
|
||||
this.Name = Path.GetFileName(fileName);
|
||||
}
|
||||
|
||||
// Token: 0x04000AF9 RID: 2809
|
||||
private global::System.Net.Mime.ContentDisposition contentDisposition = new global::System.Net.Mime.ContentDisposition();
|
||||
|
||||
// Token: 0x04000AFA RID: 2810
|
||||
private Encoding nameEncoding;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,673 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.IO;
|
||||
using System.Net.Mime;
|
||||
|
||||
namespace System.Net.Mail
|
||||
{
|
||||
/// <summary>Base class that represents an email attachment. Classes <see cref="T:System.Net.Mail.Attachment" />, <see cref="T:System.Net.Mail.AlternateView" />, and <see cref="T:System.Net.Mail.LinkedResource" /> derive from this class.</summary>
|
||||
// Token: 0x02000138 RID: 312
|
||||
public abstract class AttachmentBase : IDisposable
|
||||
{
|
||||
/// <summary>Instantiates an <see cref="T:System.Net.Mail.AttachmentBase" /> with the specified <see cref="T:System.IO.Stream" />.</summary>
|
||||
/// <param name="contentStream">A stream containing the content for this attachment.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="contentStream" /> is null.</exception>
|
||||
// Token: 0x06000AA4 RID: 2724 RVA: 0x0001DEF8 File Offset: 0x0001C0F8
|
||||
protected AttachmentBase(Stream contentStream)
|
||||
{
|
||||
if (contentStream == null)
|
||||
{
|
||||
throw new ArgumentNullException();
|
||||
}
|
||||
this.contentStream = contentStream;
|
||||
this.contentType.MediaType = "application/octet-stream";
|
||||
this.contentType.CharSet = null;
|
||||
}
|
||||
|
||||
/// <summary>Instantiates an <see cref="T:System.Net.Mail.AttachmentBase" /> with the specified <see cref="T:System.IO.Stream" /> and <see cref="T:System.Net.Mime.ContentType" />.</summary>
|
||||
/// <param name="contentStream">A stream containing the content for this attachment.</param>
|
||||
/// <param name="contentType">The type of the content.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="contentStream" /> is null.</exception>
|
||||
/// <exception cref="T:System.FormatException">
|
||||
/// <paramref name="contentType" /> is not a valid value.</exception>
|
||||
// Token: 0x06000AA5 RID: 2725 RVA: 0x0001DF4C File Offset: 0x0001C14C
|
||||
protected AttachmentBase(Stream contentStream, global::System.Net.Mime.ContentType contentType)
|
||||
{
|
||||
if (contentStream == null || contentType == null)
|
||||
{
|
||||
throw new ArgumentNullException();
|
||||
}
|
||||
this.contentStream = contentStream;
|
||||
this.contentType = contentType;
|
||||
}
|
||||
|
||||
/// <summary>Instantiates an <see cref="T:System.Net.Mail.AttachmentBase" /> with the specified <see cref="T:System.IO.Stream" /> and media type.</summary>
|
||||
/// <param name="contentStream">A stream containing the content for this attachment.</param>
|
||||
/// <param name="mediaType">The MIME media type of the content.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="contentStream" /> is null.</exception>
|
||||
/// <exception cref="T:System.FormatException">
|
||||
/// <paramref name="mediaType" /> is not a valid value.</exception>
|
||||
// Token: 0x06000AA6 RID: 2726 RVA: 0x0001DF94 File Offset: 0x0001C194
|
||||
protected AttachmentBase(Stream contentStream, string mediaType)
|
||||
{
|
||||
if (contentStream == null)
|
||||
{
|
||||
throw new ArgumentNullException();
|
||||
}
|
||||
this.contentStream = contentStream;
|
||||
this.contentType.MediaType = mediaType;
|
||||
}
|
||||
|
||||
/// <summary>Instantiates an <see cref="T:System.Net.Mail.AttachmentBase" /> with the specified file name.</summary>
|
||||
/// <param name="fileName">The file name holding the content for this attachment.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="fileName" /> is null.</exception>
|
||||
// Token: 0x06000AA7 RID: 2727 RVA: 0x0001DFD0 File Offset: 0x0001C1D0
|
||||
protected AttachmentBase(string fileName)
|
||||
{
|
||||
if (fileName == null)
|
||||
{
|
||||
throw new ArgumentNullException();
|
||||
}
|
||||
this.contentStream = File.OpenRead(fileName);
|
||||
this.contentType = new global::System.Net.Mime.ContentType(AttachmentBase.MimeTypes.GetMimeType(fileName));
|
||||
}
|
||||
|
||||
/// <summary>Instantiates an <see cref="T:System.Net.Mail.AttachmentBase" /> with the specified file name and content type.</summary>
|
||||
/// <param name="fileName">The file name holding the content for this attachment.</param>
|
||||
/// <param name="contentType">The type of the content.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="fileName" /> is null.</exception>
|
||||
/// <exception cref="T:System.FormatException">
|
||||
/// <paramref name="contentType" /> is not a valid value.</exception>
|
||||
// Token: 0x06000AA8 RID: 2728 RVA: 0x0001E020 File Offset: 0x0001C220
|
||||
protected AttachmentBase(string fileName, global::System.Net.Mime.ContentType contentType)
|
||||
{
|
||||
if (fileName == null)
|
||||
{
|
||||
throw new ArgumentNullException();
|
||||
}
|
||||
this.contentStream = File.OpenRead(fileName);
|
||||
this.contentType = contentType;
|
||||
}
|
||||
|
||||
/// <summary>Instantiates an <see cref="T:System.Net.Mail.AttachmentBase" /> with the specified file name and media type.</summary>
|
||||
/// <param name="fileName">The file name holding the content for this attachment.</param>
|
||||
/// <param name="mediaType">The MIME media type of the content.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="fileName" /> is null.</exception>
|
||||
/// <exception cref="T:System.FormatException">
|
||||
/// <paramref name="mediaType" /> is not a valid value.</exception>
|
||||
// Token: 0x06000AA9 RID: 2729 RVA: 0x0001E05C File Offset: 0x0001C25C
|
||||
protected AttachmentBase(string fileName, string mediaType)
|
||||
{
|
||||
if (fileName == null)
|
||||
{
|
||||
throw new ArgumentNullException();
|
||||
}
|
||||
this.contentStream = File.OpenRead(fileName);
|
||||
this.contentType.MediaType = mediaType;
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the MIME content ID for this attachment.</summary>
|
||||
/// <returns>A <see cref="T:System.String" /> holding the content ID.</returns>
|
||||
/// <exception cref="T:System.ArgumentNullException">Attempted to set <see cref="P:System.Net.Mail.AttachmentBase.ContentId" /> to null.</exception>
|
||||
// Token: 0x170002B0 RID: 688
|
||||
// (get) Token: 0x06000AAA RID: 2730 RVA: 0x0001E0A8 File Offset: 0x0001C2A8
|
||||
// (set) Token: 0x06000AAB RID: 2731 RVA: 0x0001E0B0 File Offset: 0x0001C2B0
|
||||
public string ContentId
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.id;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
throw new ArgumentNullException();
|
||||
}
|
||||
this.id = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the content stream of this attachment.</summary>
|
||||
/// <returns>A <see cref="T:System.IO.Stream" />.</returns>
|
||||
// Token: 0x170002B1 RID: 689
|
||||
// (get) Token: 0x06000AAC RID: 2732 RVA: 0x0001E0C8 File Offset: 0x0001C2C8
|
||||
public Stream ContentStream
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.contentStream;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the content type of this attachment.</summary>
|
||||
/// <returns>A <see cref="T:System.Net.Mime.ContentType" />.</returns>
|
||||
// Token: 0x170002B2 RID: 690
|
||||
// (get) Token: 0x06000AAD RID: 2733 RVA: 0x0001E0D0 File Offset: 0x0001C2D0
|
||||
// (set) Token: 0x06000AAE RID: 2734 RVA: 0x0001E0D8 File Offset: 0x0001C2D8
|
||||
public global::System.Net.Mime.ContentType ContentType
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.contentType;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.contentType = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the encoding of this attachment.</summary>
|
||||
/// <returns>A <see cref="T:System.Net.Mime.TransferEncoding" />.</returns>
|
||||
// Token: 0x170002B3 RID: 691
|
||||
// (get) Token: 0x06000AAF RID: 2735 RVA: 0x0001E0E4 File Offset: 0x0001C2E4
|
||||
// (set) Token: 0x06000AB0 RID: 2736 RVA: 0x0001E0EC File Offset: 0x0001C2EC
|
||||
public global::System.Net.Mime.TransferEncoding TransferEncoding
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.transferEncoding;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.transferEncoding = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Releases the resources used by the <see cref="T:System.Net.Mail.AttachmentBase" />. </summary>
|
||||
// Token: 0x06000AB1 RID: 2737 RVA: 0x0001E0F8 File Offset: 0x0001C2F8
|
||||
public void Dispose()
|
||||
{
|
||||
this.Dispose(true);
|
||||
}
|
||||
|
||||
/// <summary>Releases the unmanaged resources used by the <see cref="T:System.Net.Mail.AttachmentBase" /> and optionally releases the managed resources. </summary>
|
||||
/// <param name="disposing">true to release both managed and unmanaged resources; false to release only unmanaged resources. </param>
|
||||
// Token: 0x06000AB2 RID: 2738 RVA: 0x0001E104 File Offset: 0x0001C304
|
||||
protected virtual void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing)
|
||||
{
|
||||
this.contentStream.Close();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000AFB RID: 2811
|
||||
private string id;
|
||||
|
||||
// Token: 0x04000AFC RID: 2812
|
||||
private global::System.Net.Mime.ContentType contentType = new global::System.Net.Mime.ContentType();
|
||||
|
||||
// Token: 0x04000AFD RID: 2813
|
||||
private Stream contentStream;
|
||||
|
||||
// Token: 0x04000AFE RID: 2814
|
||||
private global::System.Net.Mime.TransferEncoding transferEncoding = global::System.Net.Mime.TransferEncoding.Base64;
|
||||
|
||||
// Token: 0x02000139 RID: 313
|
||||
private class MimeTypes
|
||||
{
|
||||
// Token: 0x06000AB4 RID: 2740 RVA: 0x0001E120 File Offset: 0x0001C320
|
||||
static MimeTypes()
|
||||
{
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("3dm", "x-world/x-3dmf");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("3dmf", "x-world/x-3dmf");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("aab", "application/x-authorware-bin");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("aam", "application/x-authorware-map");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("aas", "application/x-authorware-seg");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("abc", "text/vnd.abc");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("acgi", "text/html");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("afl", "video/animaflex");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("ai", "application/postscript");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("aif", "audio/aiff");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("aifc", "audio/aiff");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("aiff", "audio/aiff");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("aim", "application/x-aim");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("aip", "text/x-audiosoft-intra");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("ani", "application/x-navi-animation");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("aos", "application/x-nokia-9000-communicator-add-on-software");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("aps", "application/mime");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("art", "image/x-jg");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("asf", "video/x-ms-asf");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("asm", "text/x-asm");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("asp", "text/asp");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("asx", "application/x-mplayer2");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("au", "audio/x-au");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("avi", "video/avi");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("avs", "video/avs-video");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("bcpio", "application/x-bcpio");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("bm", "image/bmp");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("bmp", "image/bmp");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("boo", "application/book");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("book", "application/book");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("boz", "application/x-bzip2");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("bsh", "application/x-bsh");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("bz", "application/x-bzip");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("bz2", "application/x-bzip2");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("c", "text/plain");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("c++", "text/plain");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("cat", "application/vnd.ms-pki.seccat");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("cc", "text/plain");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("ccad", "application/clariscad");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("cco", "application/x-cocoa");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("cdf", "application/cdf");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("cer", "application/pkix-cert");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("cha", "application/x-chat");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("chat", "application/x-chat");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("class", "application/java");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("conf", "text/plain");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("cpio", "application/x-cpio");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("cpp", "text/plain");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("cpt", "application/x-cpt");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("crl", "application/pkix-crl");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("crt", "application/pkix-cert");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("csh", "application/x-csh");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("css", "text/css");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("cxx", "text/plain");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("dcr", "application/x-director");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("deepv", "application/x-deepv");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("def", "text/plain");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("der", "application/x-x509-ca-cert");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("dif", "video/x-dv");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("dir", "application/x-director");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("dl", "video/dl");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("doc", "application/msword");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("dot", "application/msword");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("dp", "application/commonground");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("drw", "application/drafting");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("dv", "video/x-dv");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("dvi", "application/x-dvi");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("dwf", "drawing/x-dwf (old)");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("dwg", "application/acad");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("dxf", "application/dxf");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("dxr", "application/x-director");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("el", "text/x-script.elisp");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("elc", "application/x-elc");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("eps", "application/postscript");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("es", "application/x-esrehber");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("etx", "text/x-setext");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("evy", "application/envoy");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("f", "text/plain");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("f77", "text/plain");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("f90", "text/plain");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("fdf", "application/vnd.fdf");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("fif", "image/fif");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("fli", "video/fli");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("flo", "image/florian");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("flx", "text/vnd.fmi.flexstor");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("fmf", "video/x-atomic3d-feature");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("for", "text/plain");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("fpx", "image/vnd.fpx");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("frl", "application/freeloader");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("funk", "audio/make");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("g", "text/plain");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("g3", "image/g3fax");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("gif", "image/gif");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("gl", "video/gl");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("gsd", "audio/x-gsm");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("gsm", "audio/x-gsm");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("gsp", "application/x-gsp");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("gss", "application/x-gss");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("gtar", "application/x-gtar");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("gz", "application/x-gzip");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("gzip", "application/x-gzip");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("h", "text/plain");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("hdf", "application/x-hdf");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("help", "application/x-helpfile");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("hgl", "application/vnd.hp-HPGL");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("hh", "text/plain");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("hlb", "text/x-script");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("hlp", "application/x-helpfile");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("hpg", "application/vnd.hp-HPGL");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("hpgl", "application/vnd.hp-HPGL");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("hqx", "application/binhex");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("hta", "application/hta");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("htc", "text/x-component");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("htm", "text/html");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("html", "text/html");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("htmls", "text/html");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("htt", "text/webviewhtml");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("htx", "text/html");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("ice", "x-conference/x-cooltalk");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("ico", "image/x-icon");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("idc", "text/plain");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("ief", "image/ief");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("iefs", "image/ief");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("iges", "application/iges");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("igs", "application/iges");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("ima", "application/x-ima");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("imap", "application/x-httpd-imap");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("inf", "application/inf");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("ins", "application/x-internett-signup");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("ip", "application/x-ip2");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("isu", "video/x-isvideo");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("it", "audio/it");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("iv", "application/x-inventor");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("ivr", "i-world/i-vrml");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("ivy", "application/x-livescreen");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("jam", "audio/x-jam");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("jav", "text/plain");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("java", "text/plain");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("jcm", "application/x-java-commerce");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("jfif", "image/jpeg");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("jfif-tbnl", "image/jpeg");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("jpe", "image/jpeg");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("jpeg", "image/jpeg");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("jpg", "image/jpeg");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("jps", "image/x-jps");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("js", "application/x-javascript");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("jut", "image/jutvision");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("kar", "audio/midi");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("ksh", "text/x-script.ksh");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("la", "audio/nspaudio");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("lam", "audio/x-liveaudio");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("latex", "application/x-latex");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("list", "text/plain");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("lma", "audio/nspaudio");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("log", "text/plain");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("lsp", "application/x-lisp");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("lst", "text/plain");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("lsx", "text/x-la-asf");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("ltx", "application/x-latex");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("m", "text/plain");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("m1v", "video/mpeg");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("m2a", "audio/mpeg");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("m2v", "video/mpeg");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("m3u", "audio/x-mpequrl");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("man", "application/x-troff-man");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("map", "application/x-navimap");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("mar", "text/plain");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("mbd", "application/mbedlet");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("mc$", "application/x-magic-cap-package-1.0");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("mcd", "application/mcad");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("mcf", "image/vasa");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("mcp", "application/netmc");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("me", "application/x-troff-me");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("mht", "message/rfc822");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("mhtml", "message/rfc822");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("mid", "audio/midi");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("midi", "audio/midi");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("mif", "application/x-mif");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("mime", "message/rfc822");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("mjf", "audio/x-vnd.AudioExplosion.MjuiceMediaFile");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("mjpg", "video/x-motion-jpeg");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("mm", "application/base64");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("mme", "application/base64");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("mod", "audio/mod");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("moov", "video/quicktime");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("mov", "video/quicktime");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("movie", "video/x-sgi-movie");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("mp2", "video/mpeg");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("mp3", "audio/mpeg3");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("mpa", "audio/mpeg");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("mpc", "application/x-project");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("mpe", "video/mpeg");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("mpeg", "video/mpeg");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("mpg", "video/mpeg");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("mpga", "audio/mpeg");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("mpp", "application/vnd.ms-project");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("mpt", "application/x-project");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("mpv", "application/x-project");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("mpx", "application/x-project");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("mrc", "application/marc");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("ms", "application/x-troff-ms");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("mv", "video/x-sgi-movie");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("my", "audio/make");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("mzz", "application/x-vnd.AudioExplosion.mzz");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("nap", "image/naplps");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("naplps", "image/naplps");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("nc", "application/x-netcdf");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("ncm", "application/vnd.nokia.configuration-message");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("nif", "image/x-niff");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("niff", "image/x-niff");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("nix", "application/x-mix-transfer");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("nsc", "application/x-conference");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("nvd", "application/x-navidoc");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("oda", "application/oda");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("omc", "application/x-omc");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("omcd", "application/x-omcdatamaker");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("omcr", "application/x-omcregerator");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("p", "text/x-pascal");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("p10", "application/pkcs10");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("p12", "application/pkcs-12");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("p7a", "application/x-pkcs7-signature");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("p7c", "application/pkcs7-mime");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("p7m", "application/pkcs7-mime");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("p7r", "application/x-pkcs7-certreqresp");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("p7s", "application/pkcs7-signature");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("part", "application/pro_eng");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("pas", "text/pascal");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("pbm", "image/x-portable-bitmap");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("pcl", "application/x-pcl");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("pct", "image/x-pict");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("pcx", "image/x-pcx");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("pdb", "chemical/x-pdb");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("pdf", "application/pdf");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("pfunk", "audio/make");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("pgm", "image/x-portable-graymap");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("pic", "image/pict");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("pict", "image/pict");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("pkg", "application/x-newton-compatible-pkg");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("pko", "application/vnd.ms-pki.pko");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("pl", "text/plain");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("plx", "application/x-PiXCLscript");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("pm", "image/x-xpixmap");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("pm4", "application/x-pagemaker");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("pm5", "application/x-pagemaker");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("png", "image/png");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("pnm", "application/x-portable-anymap");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("pot", "application/mspowerpoint");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("pov", "model/x-pov");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("ppa", "application/vnd.ms-powerpoint");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("ppm", "image/x-portable-pixmap");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("pps", "application/mspowerpoint");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("ppt", "application/mspowerpoint");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("ppz", "application/mspowerpoint");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("pre", "application/x-freelance");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("prt", "application/pro_eng");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("ps", "application/postscript");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("pvu", "paleovu/x-pv");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("pwz", "application/vnd.ms-powerpoint");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("py", "text/x-script.phyton");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("pyc", "applicaiton/x-bytecode.python");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("qcp", "audio/vnd.qcelp");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("qd3", "x-world/x-3dmf");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("qd3d", "x-world/x-3dmf");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("qif", "image/x-quicktime");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("qt", "video/quicktime");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("qtc", "video/x-qtc");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("qti", "image/x-quicktime");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("qtif", "image/x-quicktime");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("ra", "audio/x-pn-realaudio");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("ram", "audio/x-pn-realaudio");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("ras", "application/x-cmu-raster");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("rast", "image/cmu-raster");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("rexx", "text/x-script.rexx");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("rf", "image/vnd.rn-realflash");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("rgb", "image/x-rgb");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("rm", "application/vnd.rn-realmedia");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("rmi", "audio/mid");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("rmm", "audio/x-pn-realaudio");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("rmp", "audio/x-pn-realaudio");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("rng", "application/ringing-tones");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("rnx", "application/vnd.rn-realplayer");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("roff", "application/x-troff");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("rp", "image/vnd.rn-realpix");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("rpm", "audio/x-pn-realaudio-plugin");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("rss", "text/xml");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("rt", "text/richtext");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("rtf", "text/richtext");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("rtx", "text/richtext");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("rv", "video/vnd.rn-realvideo");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("s", "text/x-asm");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("s3m", "audio/s3m");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("sbk", "application/x-tbook");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("scm", "application/x-lotusscreencam");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("sdml", "text/plain");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("sdp", "application/sdp");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("sdr", "application/sounder");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("sea", "application/sea");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("set", "application/set");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("sgm", "text/sgml");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("sgml", "text/sgml");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("sh", "text/x-script.sh");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("shar", "application/x-bsh");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("shtml", "text/html");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("sid", "audio/x-psid");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("sit", "application/x-sit");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("skd", "application/x-koan");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("skm", "application/x-koan");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("skp", "application/x-koan");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("skt", "application/x-koan");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("sl", "application/x-seelogo");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("smi", "application/smil");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("smil", "application/smil");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("snd", "audio/basic");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("sol", "application/solids");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("spc", "application/x-pkcs7-certificates");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("spl", "application/futuresplash");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("spr", "application/x-sprite");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("sprite", "application/x-sprite");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("src", "application/x-wais-source");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("ssi", "text/x-server-parsed-html");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("ssm", "application/streamingmedia");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("sst", "application/vnd.ms-pki.certstore");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("step", "application/step");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("stl", "application/sla");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("stp", "application/step");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("sv4cpio", "application/x-sv4cpio");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("sv4crc", "application/x-sv4crc");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("svf", "image/x-dwg");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("svr", "application/x-world");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("swf", "application/x-shockwave-flash");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("t", "application/x-troff");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("talk", "text/x-speech");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("tar", "application/x-tar");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("tbk", "application/toolbook");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("tcl", "text/x-script.tcl");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("tcsh", "text/x-script.tcsh");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("tex", "application/x-tex");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("texi", "application/x-texinfo");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("texinfo", "application/x-texinfo");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("text", "text/plain");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("tgz", "application/x-compressed");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("tif", "image/tiff");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("tiff", "image/tiff");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("tr", "application/x-troff");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("tsi", "audio/tsp-audio");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("tsp", "audio/tsplayer");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("tsv", "text/tab-separated-values");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("turbot", "image/florian");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("txt", "text/plain");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("uil", "text/x-uil");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("uni", "text/uri-list");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("unis", "text/uri-list");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("unv", "application/i-deas");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("uri", "text/uri-list");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("uris", "text/uri-list");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("ustar", "multipart/x-ustar");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("uu", "text/x-uuencode");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("uue", "text/x-uuencode");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("vcd", "application/x-cdlink");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("vcs", "text/x-vCalendar");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("vda", "application/vda");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("vdo", "video/vdo");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("vew", "application/groupwise");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("viv", "video/vivo");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("vivo", "video/vivo");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("vmd", "application/vocaltec-media-desc");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("vmf", "application/vocaltec-media-file");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("voc", "audio/voc");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("vos", "video/vosaic");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("vox", "audio/voxware");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("vqe", "audio/x-twinvq-plugin");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("vqf", "audio/x-twinvq");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("vql", "audio/x-twinvq-plugin");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("vrml", "application/x-vrml");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("vrt", "x-world/x-vrt");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("vsd", "application/x-visio");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("vst", "application/x-visio");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("vsw", "application/x-visio");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("w60", "application/wordperfect6.0");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("w61", "application/wordperfect6.1");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("w6w", "application/msword");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("wav", "audio/wav");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("wb1", "application/x-qpro");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("wbmp", "image/vnd.wap.wbmp");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("web", "application/vnd.xara");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("wiz", "application/msword");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("wk1", "application/x-123");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("wmf", "windows/metafile");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("wml", "text/vnd.wap.wml");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("wmlc", "application/vnd.wap.wmlc");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("wmls", "text/vnd.wap.wmlscript");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("wmlsc", "application/vnd.wap.wmlscriptc");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("word", "application/msword");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("wp", "application/wordperfect");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("wp5", "application/wordperfect");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("wp6", "application/wordperfect");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("wpd", "application/wordperfect");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("wq1", "application/x-lotus");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("wri", "application/mswrite");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("wrl", "application/x-world");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("wrz", "model/vrml");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("wsc", "text/scriplet");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("wsrc", "application/x-wais-source");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("wtk", "application/x-wintalk");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("xbm", "image/x-xbitmap");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("xdr", "video/x-amt-demorun");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("xgz", "xgl/drawing");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("xif", "image/vnd.xiff");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("xl", "application/excel");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("xla", "application/excel");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("xlb", "application/excel");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("xlc", "application/excel");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("xld", "application/excel");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("xlk", "application/excel");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("xll", "application/excel");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("xlm", "application/excel");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("xls", "application/excel");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("xlt", "application/excel");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("xlv", "application/excel");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("xlw", "application/excel");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("xm", "audio/xm");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("xml", "text/xml");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("xmz", "xgl/movie");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("xpix", "application/x-vnd.ls-xpix");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("xpm", "image/xpm");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("x-png", "image/png");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("xsr", "video/x-amt-showrun");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("xwd", "image/x-xwd");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("xyz", "chemical/x-pdb");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("z", "application/x-compressed");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("zip", "application/zip");
|
||||
AttachmentBase.MimeTypes.mimeTypes.Add("zsh", "text/x-script.zsh");
|
||||
}
|
||||
|
||||
// Token: 0x06000AB5 RID: 2741 RVA: 0x000202FC File Offset: 0x0001E4FC
|
||||
public static string GetMimeType(string fileName)
|
||||
{
|
||||
string text = null;
|
||||
int num = fileName.LastIndexOf('.');
|
||||
if (num != -1 && fileName.Length > num + 1)
|
||||
{
|
||||
text = AttachmentBase.MimeTypes.mimeTypes[fileName.Substring(num + 1)] as string;
|
||||
}
|
||||
if (text == null)
|
||||
{
|
||||
text = "application/octet-stream";
|
||||
}
|
||||
return text;
|
||||
}
|
||||
|
||||
// Token: 0x04000AFF RID: 2815
|
||||
private static Hashtable mimeTypes = new Hashtable(StringComparer.InvariantCultureIgnoreCase);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
using System;
|
||||
using System.Collections.ObjectModel;
|
||||
|
||||
namespace System.Net.Mail
|
||||
{
|
||||
/// <summary>Stores attachments to be sent as part of an e-mail message.</summary>
|
||||
// Token: 0x0200013A RID: 314
|
||||
public sealed class AttachmentCollection : Collection<Attachment>, IDisposable
|
||||
{
|
||||
// Token: 0x06000AB6 RID: 2742 RVA: 0x00020350 File Offset: 0x0001E550
|
||||
internal AttachmentCollection()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Releases all resources used by the <see cref="T:System.Net.Mail.AttachmentCollection" />. </summary>
|
||||
// Token: 0x06000AB7 RID: 2743 RVA: 0x00020358 File Offset: 0x0001E558
|
||||
public void Dispose()
|
||||
{
|
||||
for (int i = 0; i < this.Count; i++)
|
||||
{
|
||||
this[i].Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000AB8 RID: 2744 RVA: 0x00020388 File Offset: 0x0001E588
|
||||
protected override void ClearItems()
|
||||
{
|
||||
base.ClearItems();
|
||||
}
|
||||
|
||||
// Token: 0x06000AB9 RID: 2745 RVA: 0x00020390 File Offset: 0x0001E590
|
||||
protected override void InsertItem(int index, Attachment item)
|
||||
{
|
||||
base.InsertItem(index, item);
|
||||
}
|
||||
|
||||
// Token: 0x06000ABA RID: 2746 RVA: 0x0002039C File Offset: 0x0001E59C
|
||||
protected override void RemoveItem(int index)
|
||||
{
|
||||
base.RemoveItem(index);
|
||||
}
|
||||
|
||||
// Token: 0x06000ABB RID: 2747 RVA: 0x000203A8 File Offset: 0x0001E5A8
|
||||
protected override void SetItem(int index, Attachment item)
|
||||
{
|
||||
base.SetItem(index, item);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.Mail
|
||||
{
|
||||
// Token: 0x02000148 RID: 328
|
||||
internal class CCredentialsByHost : ICredentialsByHost
|
||||
{
|
||||
// Token: 0x06000B4E RID: 2894 RVA: 0x00022D3C File Offset: 0x00020F3C
|
||||
public CCredentialsByHost(string userName, string password)
|
||||
{
|
||||
this.userName = userName;
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
// Token: 0x06000B4F RID: 2895 RVA: 0x00022D54 File Offset: 0x00020F54
|
||||
public NetworkCredential GetCredential(string host, int port, string authenticationType)
|
||||
{
|
||||
return new NetworkCredential(this.userName, this.password);
|
||||
}
|
||||
|
||||
// Token: 0x04000B51 RID: 2897
|
||||
private string userName;
|
||||
|
||||
// Token: 0x04000B52 RID: 2898
|
||||
private string password;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.Mail
|
||||
{
|
||||
/// <summary>Describes the delivery notification options for e-mail.</summary>
|
||||
// Token: 0x0200013B RID: 315
|
||||
[Flags]
|
||||
public enum DeliveryNotificationOptions
|
||||
{
|
||||
/// <summary>No notification.</summary>
|
||||
// Token: 0x04000B01 RID: 2817
|
||||
None = 0,
|
||||
/// <summary>Notify if the delivery is successful.</summary>
|
||||
// Token: 0x04000B02 RID: 2818
|
||||
OnSuccess = 1,
|
||||
/// <summary>Notify if the delivery is unsuccessful.</summary>
|
||||
// Token: 0x04000B03 RID: 2819
|
||||
OnFailure = 2,
|
||||
/// <summary>Notify if the delivery is delayed</summary>
|
||||
// Token: 0x04000B04 RID: 2820
|
||||
Delay = 4,
|
||||
/// <summary>Never notify.</summary>
|
||||
// Token: 0x04000B05 RID: 2821
|
||||
Never = 134217728
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,185 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Net.Mime;
|
||||
using System.Text;
|
||||
|
||||
namespace System.Net.Mail
|
||||
{
|
||||
/// <summary>Represents an embedded external resource in an email attachment, such as an image in an HTML attachment.</summary>
|
||||
// Token: 0x0200013C RID: 316
|
||||
public class LinkedResource : AttachmentBase
|
||||
{
|
||||
/// <summary>Initializes a new instance of <see cref="T:System.Net.Mail.LinkedResource" /> using the specified file name.</summary>
|
||||
/// <param name="fileName">The file name holding the content for this embedded resource.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="fileName" /> is null.</exception>
|
||||
// Token: 0x06000ABC RID: 2748 RVA: 0x000203B4 File Offset: 0x0001E5B4
|
||||
public LinkedResource(string fileName)
|
||||
: base(fileName)
|
||||
{
|
||||
if (fileName == null)
|
||||
{
|
||||
throw new ArgumentNullException();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of <see cref="T:System.Net.Mail.LinkedResource" /> with the specified file name and content type.</summary>
|
||||
/// <param name="fileName">The file name that holds the content for this embedded resource.</param>
|
||||
/// <param name="contentType">The type of the content.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="fileName" /> is null.</exception>
|
||||
/// <exception cref="T:System.FormatException">
|
||||
/// <paramref name="contentType" /> is not a valid value.</exception>
|
||||
// Token: 0x06000ABD RID: 2749 RVA: 0x000203CC File Offset: 0x0001E5CC
|
||||
public LinkedResource(string fileName, global::System.Net.Mime.ContentType contentType)
|
||||
: base(fileName, contentType)
|
||||
{
|
||||
if (fileName == null)
|
||||
{
|
||||
throw new ArgumentNullException();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of <see cref="T:System.Net.Mail.LinkedResource" /> with the specified file name and media type.</summary>
|
||||
/// <param name="fileName">The file name that holds the content for this embedded resource.</param>
|
||||
/// <param name="mediaType">The MIME media type of the content.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="fileName" /> is null.</exception>
|
||||
/// <exception cref="T:System.FormatException">
|
||||
/// <paramref name="mediaType" /> is not a valid value.</exception>
|
||||
// Token: 0x06000ABE RID: 2750 RVA: 0x000203E4 File Offset: 0x0001E5E4
|
||||
public LinkedResource(string fileName, string mediaType)
|
||||
: base(fileName, mediaType)
|
||||
{
|
||||
if (fileName == null)
|
||||
{
|
||||
throw new ArgumentNullException();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of <see cref="T:System.Net.Mail.LinkedResource" /> using the supplied <see cref="T:System.IO.Stream" />.</summary>
|
||||
/// <param name="contentStream">A stream that contains the content for this embedded resource.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="contentStream" /> is null.</exception>
|
||||
// Token: 0x06000ABF RID: 2751 RVA: 0x000203FC File Offset: 0x0001E5FC
|
||||
public LinkedResource(Stream contentStream)
|
||||
: base(contentStream)
|
||||
{
|
||||
if (contentStream == null)
|
||||
{
|
||||
throw new ArgumentNullException();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of <see cref="T:System.Net.Mail.LinkedResource" /> with the values supplied by <see cref="T:System.IO.Stream" /> and <see cref="T:System.Net.Mime.ContentType" />.</summary>
|
||||
/// <param name="contentStream">A stream that contains the content for this embedded resource.</param>
|
||||
/// <param name="contentType">The type of the content.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="contentStream" /> is null.</exception>
|
||||
/// <exception cref="T:System.FormatException">
|
||||
/// <paramref name="contentType" /> is not a valid value.</exception>
|
||||
// Token: 0x06000AC0 RID: 2752 RVA: 0x00020414 File Offset: 0x0001E614
|
||||
public LinkedResource(Stream contentStream, global::System.Net.Mime.ContentType contentType)
|
||||
: base(contentStream, contentType)
|
||||
{
|
||||
if (contentStream == null)
|
||||
{
|
||||
throw new ArgumentNullException();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of <see cref="T:System.Net.Mail.LinkedResource" /> with the specified <see cref="T:System.IO.Stream" /> and media type.</summary>
|
||||
/// <param name="contentStream">A stream that contains the content for this embedded resource.</param>
|
||||
/// <param name="mediaType">The MIME media type of the content.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="contentStream" /> is null.</exception>
|
||||
/// <exception cref="T:System.FormatException">
|
||||
/// <paramref name="mediaType" /> is not a valid value.</exception>
|
||||
// Token: 0x06000AC1 RID: 2753 RVA: 0x0002042C File Offset: 0x0001E62C
|
||||
public LinkedResource(Stream contentStream, string mediaType)
|
||||
: base(contentStream, mediaType)
|
||||
{
|
||||
if (contentStream == null)
|
||||
{
|
||||
throw new ArgumentNullException();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets a URI that the resource must match.</summary>
|
||||
/// <returns>If <see cref="P:System.Net.Mail.LinkedResource.ContentLink" /> is a relative URI, the recipient of the message must resolve it.</returns>
|
||||
// Token: 0x170002B4 RID: 692
|
||||
// (get) Token: 0x06000AC2 RID: 2754 RVA: 0x00020444 File Offset: 0x0001E644
|
||||
// (set) Token: 0x06000AC3 RID: 2755 RVA: 0x0002044C File Offset: 0x0001E64C
|
||||
public global::System.Uri ContentLink
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.contentLink;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.contentLink = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Creates a <see cref="T:System.Net.Mail.LinkedResource" /> object from a string to be included in an email attachment as an embedded resource. The default media type is plain text, and the default content type is ASCII.</summary>
|
||||
/// <returns>A <see cref="T:System.Net.Mail.LinkedResource" /> object that contains the embedded resource to be included in the email attachment.</returns>
|
||||
/// <param name="content">A string that contains the embedded resource to be included in the email attachment.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">The specified content string is null.</exception>
|
||||
// Token: 0x06000AC4 RID: 2756 RVA: 0x00020458 File Offset: 0x0001E658
|
||||
public static LinkedResource CreateLinkedResourceFromString(string content)
|
||||
{
|
||||
if (content == null)
|
||||
{
|
||||
throw new ArgumentNullException();
|
||||
}
|
||||
MemoryStream memoryStream = new MemoryStream(Encoding.Default.GetBytes(content));
|
||||
return new LinkedResource(memoryStream)
|
||||
{
|
||||
TransferEncoding = global::System.Net.Mime.TransferEncoding.QuotedPrintable
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>Creates a <see cref="T:System.Net.Mail.LinkedResource" /> object from a string to be included in an email attachment as an embedded resource, with the specified content type, and media type as plain text.</summary>
|
||||
/// <returns>A <see cref="T:System.Net.Mail.LinkedResource" /> object that contains the embedded resource to be included in the email attachment.</returns>
|
||||
/// <param name="content">A string that contains the embedded resource to be included in the email attachment.</param>
|
||||
/// <param name="contentType">The type of the content.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">The specified content string is null.</exception>
|
||||
// Token: 0x06000AC5 RID: 2757 RVA: 0x00020494 File Offset: 0x0001E694
|
||||
public static LinkedResource CreateLinkedResourceFromString(string content, global::System.Net.Mime.ContentType contentType)
|
||||
{
|
||||
if (content == null)
|
||||
{
|
||||
throw new ArgumentNullException();
|
||||
}
|
||||
MemoryStream memoryStream = new MemoryStream(Encoding.Default.GetBytes(content));
|
||||
return new LinkedResource(memoryStream, contentType)
|
||||
{
|
||||
TransferEncoding = global::System.Net.Mime.TransferEncoding.QuotedPrintable
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>Creates a <see cref="T:System.Net.Mail.LinkedResource" /> object from a string to be included in an email attachment as an embedded resource, with the specified content type, and media type.</summary>
|
||||
/// <returns>A <see cref="T:System.Net.Mail.LinkedResource" /> object that contains the embedded resource to be included in the email attachment.</returns>
|
||||
/// <param name="content">A string that contains the embedded resource to be included in the email attachment.</param>
|
||||
/// <param name="contentEncoding">The type of the content.</param>
|
||||
/// <param name="mediaType">The MIME media type of the content.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">The specified content string is null.</exception>
|
||||
// Token: 0x06000AC6 RID: 2758 RVA: 0x000204D0 File Offset: 0x0001E6D0
|
||||
public static LinkedResource CreateLinkedResourceFromString(string content, Encoding contentEncoding, string mediaType)
|
||||
{
|
||||
if (content == null)
|
||||
{
|
||||
throw new ArgumentNullException();
|
||||
}
|
||||
MemoryStream memoryStream = new MemoryStream(contentEncoding.GetBytes(content));
|
||||
return new LinkedResource(memoryStream, mediaType)
|
||||
{
|
||||
TransferEncoding = global::System.Net.Mime.TransferEncoding.QuotedPrintable
|
||||
};
|
||||
}
|
||||
|
||||
// Token: 0x04000B06 RID: 2822
|
||||
private global::System.Uri contentLink;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
using System;
|
||||
using System.Collections.ObjectModel;
|
||||
|
||||
namespace System.Net.Mail
|
||||
{
|
||||
/// <summary>Stores linked resources to be sent as part of an e-mail message.</summary>
|
||||
// Token: 0x0200013D RID: 317
|
||||
public sealed class LinkedResourceCollection : Collection<LinkedResource>, IDisposable
|
||||
{
|
||||
// Token: 0x06000AC7 RID: 2759 RVA: 0x00020508 File Offset: 0x0001E708
|
||||
internal LinkedResourceCollection()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Releases all resources used by the <see cref="T:System.Net.Mail.LinkedResourceCollection" />.</summary>
|
||||
// Token: 0x06000AC8 RID: 2760 RVA: 0x00020510 File Offset: 0x0001E710
|
||||
public void Dispose()
|
||||
{
|
||||
this.Dispose(true);
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
// Token: 0x06000AC9 RID: 2761 RVA: 0x00020520 File Offset: 0x0001E720
|
||||
private void Dispose(bool disposing)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06000ACA RID: 2762 RVA: 0x00020524 File Offset: 0x0001E724
|
||||
protected override void ClearItems()
|
||||
{
|
||||
base.ClearItems();
|
||||
}
|
||||
|
||||
// Token: 0x06000ACB RID: 2763 RVA: 0x0002052C File Offset: 0x0001E72C
|
||||
protected override void InsertItem(int index, LinkedResource item)
|
||||
{
|
||||
base.InsertItem(index, item);
|
||||
}
|
||||
|
||||
// Token: 0x06000ACC RID: 2764 RVA: 0x00020538 File Offset: 0x0001E738
|
||||
protected override void RemoveItem(int index)
|
||||
{
|
||||
base.RemoveItem(index);
|
||||
}
|
||||
|
||||
// Token: 0x06000ACD RID: 2765 RVA: 0x00020544 File Offset: 0x0001E744
|
||||
protected override void SetItem(int index, LinkedResource item)
|
||||
{
|
||||
base.SetItem(index, item);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,202 @@
|
||||
using System;
|
||||
using System.Text;
|
||||
|
||||
namespace System.Net.Mail
|
||||
{
|
||||
/// <summary>Represents the address of an electronic mail sender or recipient.</summary>
|
||||
// Token: 0x0200013E RID: 318
|
||||
public class MailAddress
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Net.Mail.MailAddress" /> class using the specified address. </summary>
|
||||
/// <param name="address">A <see cref="T:System.String" /> that contains an e-mail address.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="address" /> is null.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="address" /> is <see cref="F:System.String.Empty" /> ("").</exception>
|
||||
/// <exception cref="T:System.FormatException">
|
||||
/// <paramref name="address" /> is not in a recognized format.</exception>
|
||||
// Token: 0x06000ACE RID: 2766 RVA: 0x00020550 File Offset: 0x0001E750
|
||||
public MailAddress(string address)
|
||||
: this(address, null)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Net.Mail.MailAddress" /> class using the specified address and display name.</summary>
|
||||
/// <param name="address">A <see cref="T:System.String" /> that contains an e-mail address.</param>
|
||||
/// <param name="displayName">A <see cref="T:System.String" /> that contains the display name associated with <paramref name="address" />. This parameter can be null.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="address" /> is null.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="address" /> is <see cref="F:System.String.Empty" /> ("").</exception>
|
||||
/// <exception cref="T:System.FormatException">
|
||||
/// <paramref name="address" /> is not in a recognized format.-or-<paramref name="address" /> contains non-ASCII characters.</exception>
|
||||
// Token: 0x06000ACF RID: 2767 RVA: 0x0002055C File Offset: 0x0001E75C
|
||||
public MailAddress(string address, string displayName)
|
||||
: this(address, displayName, Encoding.Default)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Net.Mail.MailAddress" /> class using the specified address, display name, and encoding.</summary>
|
||||
/// <param name="address">A <see cref="T:System.String" /> that contains an e-mail address.</param>
|
||||
/// <param name="displayName">A <see cref="T:System.String" /> that contains the display name associated with <paramref name="address" />.</param>
|
||||
/// <param name="displayNameEncoding">The <see cref="T:System.Text.Encoding" /> that defines the character set used for <paramref name="displayName" />.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="address" /> is null.-or-<paramref name="displayName" /> is null.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="address" /> is <see cref="F:System.String.Empty" /> ("").-or-<paramref name="displayName" /> is <see cref="F:System.String.Empty" /> ("").</exception>
|
||||
/// <exception cref="T:System.FormatException">
|
||||
/// <paramref name="address" /> is not in a recognized format.-or-<paramref name="address" /> contains non-ASCII characters.</exception>
|
||||
// Token: 0x06000AD0 RID: 2768 RVA: 0x0002056C File Offset: 0x0001E76C
|
||||
public MailAddress(string address, string displayName, Encoding displayNameEncoding)
|
||||
{
|
||||
if (address == null)
|
||||
{
|
||||
throw new ArgumentNullException("address");
|
||||
}
|
||||
int num = address.IndexOf('"');
|
||||
if (num == 0)
|
||||
{
|
||||
int num2 = address.IndexOf('"', num + 1);
|
||||
if (num2 == -1)
|
||||
{
|
||||
throw MailAddress.CreateFormatException();
|
||||
}
|
||||
this.displayName = address.Substring(num + 1, num2 - 1).Trim();
|
||||
address = address.Substring(num2 + 1);
|
||||
}
|
||||
int num3 = address.IndexOf('<');
|
||||
if (num3 != -1)
|
||||
{
|
||||
if (num3 + 1 >= address.Length)
|
||||
{
|
||||
throw MailAddress.CreateFormatException();
|
||||
}
|
||||
int num4 = address.IndexOf('>', num3 + 1);
|
||||
if (num4 == -1)
|
||||
{
|
||||
throw MailAddress.CreateFormatException();
|
||||
}
|
||||
if (this.displayName == null)
|
||||
{
|
||||
this.displayName = address.Substring(0, num3).Trim();
|
||||
}
|
||||
address = address.Substring(++num3, num4 - num3);
|
||||
}
|
||||
if (displayName != null)
|
||||
{
|
||||
this.displayName = displayName.Trim();
|
||||
}
|
||||
this.address = address.Trim();
|
||||
}
|
||||
|
||||
/// <summary>Gets the e-mail address specified when this instance was created.</summary>
|
||||
/// <returns>A <see cref="T:System.String" /> that contains the e-mail address.</returns>
|
||||
// Token: 0x170002B5 RID: 693
|
||||
// (get) Token: 0x06000AD1 RID: 2769 RVA: 0x00020664 File Offset: 0x0001E864
|
||||
public string Address
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.address;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the display name composed from the display name and address information specified when this instance was created.</summary>
|
||||
/// <returns>A <see cref="T:System.String" /> that contains the display name; otherwise, <see cref="F:System.String.Empty" /> ("") if no display name information was specified when this instance was created.</returns>
|
||||
// Token: 0x170002B6 RID: 694
|
||||
// (get) Token: 0x06000AD2 RID: 2770 RVA: 0x0002066C File Offset: 0x0001E86C
|
||||
public string DisplayName
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.displayName == null)
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
return this.displayName;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the host portion of the address specified when this instance was created.</summary>
|
||||
/// <returns>A <see cref="T:System.String" /> that contains the name of the host computer that accepts e-mail for the <see cref="P:System.Net.Mail.MailAddress.User" /> property.</returns>
|
||||
// Token: 0x170002B7 RID: 695
|
||||
// (get) Token: 0x06000AD3 RID: 2771 RVA: 0x00020688 File Offset: 0x0001E888
|
||||
public string Host
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Address.Substring(this.address.IndexOf("@") + 1);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the user information from the address specified when this instance was created.</summary>
|
||||
/// <returns>A <see cref="T:System.String" /> that contains the user name portion of the <see cref="P:System.Net.Mail.MailAddress.Address" />.</returns>
|
||||
// Token: 0x170002B8 RID: 696
|
||||
// (get) Token: 0x06000AD4 RID: 2772 RVA: 0x000206A8 File Offset: 0x0001E8A8
|
||||
public string User
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Address.Substring(0, this.address.IndexOf("@"));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Compares two mail addresses.</summary>
|
||||
/// <returns>true if the two mail addresses are equal; otherwise, false.</returns>
|
||||
/// <param name="value">A <see cref="T:System.Net.Mail.MailAddress" /> instance to compare to the current instance.</param>
|
||||
// Token: 0x06000AD5 RID: 2773 RVA: 0x000206C8 File Offset: 0x0001E8C8
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
return this.Equals(obj as MailAddress);
|
||||
}
|
||||
|
||||
// Token: 0x06000AD6 RID: 2774 RVA: 0x000206D8 File Offset: 0x0001E8D8
|
||||
private bool Equals(MailAddress other)
|
||||
{
|
||||
return other != null && this.Address == other.Address;
|
||||
}
|
||||
|
||||
/// <summary>Returns a hash value for a mail address.</summary>
|
||||
/// <returns>An integer hash value.</returns>
|
||||
// Token: 0x06000AD7 RID: 2775 RVA: 0x000206F4 File Offset: 0x0001E8F4
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return this.address.GetHashCode();
|
||||
}
|
||||
|
||||
/// <summary>Returns a string representation of this instance.</summary>
|
||||
/// <returns>A <see cref="T:System.String" /> that contains the contents of this <see cref="T:System.Net.Mail.MailAddress" />.</returns>
|
||||
// Token: 0x06000AD8 RID: 2776 RVA: 0x00020704 File Offset: 0x0001E904
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
if (this.DisplayName != null && this.DisplayName.Length > 0)
|
||||
{
|
||||
stringBuilder.Append("\"");
|
||||
stringBuilder.Append(this.DisplayName);
|
||||
stringBuilder.Append("\"");
|
||||
stringBuilder.Append(" ");
|
||||
stringBuilder.Append("<");
|
||||
stringBuilder.Append(this.Address);
|
||||
stringBuilder.Append(">");
|
||||
}
|
||||
else
|
||||
{
|
||||
stringBuilder.Append(this.Address);
|
||||
}
|
||||
return stringBuilder.ToString();
|
||||
}
|
||||
|
||||
// Token: 0x06000AD9 RID: 2777 RVA: 0x000207A4 File Offset: 0x0001E9A4
|
||||
private static FormatException CreateFormatException()
|
||||
{
|
||||
return new FormatException("The specified string is not in the form required for an e-mail address.");
|
||||
}
|
||||
|
||||
// Token: 0x04000B07 RID: 2823
|
||||
private string address;
|
||||
|
||||
// Token: 0x04000B08 RID: 2824
|
||||
private string displayName;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
using System;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Text;
|
||||
|
||||
namespace System.Net.Mail
|
||||
{
|
||||
/// <summary>Store e-mail addresses that are associated with an e-mail message.</summary>
|
||||
// Token: 0x0200013F RID: 319
|
||||
public class MailAddressCollection : Collection<MailAddress>
|
||||
{
|
||||
/// <summary>Add a list of e-mail addresses to the collection.</summary>
|
||||
/// <param name="addresses">The e-mail addresses to add to the <see cref="T:System.Net.Mail.MailAddressCollection" />. Multiple e-mail addresses must be separated with a comma character (","). </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">The<paramref name=" addresses" /> parameter is null.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">The<paramref name=" addresses" /> parameter is an empty string.</exception>
|
||||
/// <exception cref="T:System.FormatException">The<paramref name=" addresses" /> parameter contains an e-mail address that is invalid or not supported. </exception>
|
||||
// Token: 0x06000ADB RID: 2779 RVA: 0x000207B8 File Offset: 0x0001E9B8
|
||||
public void Add(string addresses)
|
||||
{
|
||||
foreach (string text in addresses.Split(new char[] { ',' }))
|
||||
{
|
||||
this.Add(new MailAddress(text));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Inserts an e-mail address into the <see cref="T:System.Net.Mail.MailAddressCollection" />, at the specified location.</summary>
|
||||
/// <param name="index">The location at which to insert the e-mail address that is specified by <paramref name="item" />.</param>
|
||||
/// <param name="item">The e-mail address to be inserted into the collection.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">The<paramref name=" item" /> parameter is null.</exception>
|
||||
// Token: 0x06000ADC RID: 2780 RVA: 0x000207FC File Offset: 0x0001E9FC
|
||||
protected override void InsertItem(int index, MailAddress item)
|
||||
{
|
||||
if (item == null)
|
||||
{
|
||||
throw new ArgumentNullException();
|
||||
}
|
||||
base.InsertItem(index, item);
|
||||
}
|
||||
|
||||
/// <summary>Replaces the element at the specified index.</summary>
|
||||
/// <param name="index">The index of the e-mail address element to be replaced.</param>
|
||||
/// <param name="item">An e-mail address that will replace the element in the collection.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">The<paramref name=" item" /> parameter is null.</exception>
|
||||
// Token: 0x06000ADD RID: 2781 RVA: 0x00020814 File Offset: 0x0001EA14
|
||||
protected override void SetItem(int index, MailAddress item)
|
||||
{
|
||||
if (item == null)
|
||||
{
|
||||
throw new ArgumentNullException();
|
||||
}
|
||||
base.SetItem(index, item);
|
||||
}
|
||||
|
||||
/// <summary>Returns a string representation of the e-mail addresses in this <see cref="T:System.Net.Mail.MailAddressCollection" /> object.</summary>
|
||||
/// <returns>A <see cref="T:System.String" /> containing the e-mail addresses in this collection.</returns>
|
||||
// Token: 0x06000ADE RID: 2782 RVA: 0x0002082C File Offset: 0x0001EA2C
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
for (int i = 0; i < this.Count; i++)
|
||||
{
|
||||
if (i > 0)
|
||||
{
|
||||
stringBuilder.Append(", ");
|
||||
}
|
||||
stringBuilder.Append(this[i].ToString());
|
||||
}
|
||||
return stringBuilder.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,480 @@
|
||||
using System;
|
||||
using System.Collections.Specialized;
|
||||
using System.Net.Mime;
|
||||
using System.Text;
|
||||
|
||||
namespace System.Net.Mail
|
||||
{
|
||||
/// <summary>Represents an e-mail message that can be sent using the <see cref="T:System.Net.Mail.SmtpClient" /> class.</summary>
|
||||
// Token: 0x02000140 RID: 320
|
||||
public class MailMessage : IDisposable
|
||||
{
|
||||
/// <summary>Initializes an empty instance of the <see cref="T:System.Net.Mail.MailMessage" /> class.</summary>
|
||||
// Token: 0x06000ADF RID: 2783 RVA: 0x00020884 File Offset: 0x0001EA84
|
||||
public MailMessage()
|
||||
{
|
||||
this.to = new MailAddressCollection();
|
||||
this.alternateViews = new AlternateViewCollection();
|
||||
this.attachments = new AttachmentCollection();
|
||||
this.bcc = new MailAddressCollection();
|
||||
this.cc = new MailAddressCollection();
|
||||
this.replyTo = new MailAddressCollection();
|
||||
this.headers = new global::System.Collections.Specialized.NameValueCollection();
|
||||
this.headers.Add("MIME-Version", "1.0");
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Net.Mail.MailMessage" /> class by using the specified <see cref="T:System.Net.Mail.MailAddress" /> class objects. </summary>
|
||||
/// <param name="from">A <see cref="T:System.Net.Mail.MailAddress" /> that contains the address of the sender of the e-mail message.</param>
|
||||
/// <param name="to">A <see cref="T:System.Net.Mail.MailAddress" /> that contains the address of the recipient of the e-mail message.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="from" /> is null.-or-<paramref name="to" /> is null.</exception>
|
||||
/// <exception cref="T:System.FormatException">
|
||||
/// <paramref name="from" /> or <paramref name="to" /> is malformed.</exception>
|
||||
// Token: 0x06000AE0 RID: 2784 RVA: 0x00020904 File Offset: 0x0001EB04
|
||||
public MailMessage(MailAddress from, MailAddress to)
|
||||
: this()
|
||||
{
|
||||
if (from == null || to == null)
|
||||
{
|
||||
throw new ArgumentNullException();
|
||||
}
|
||||
this.From = from;
|
||||
this.to.Add(to);
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Net.Mail.MailMessage" /> class by using the specified <see cref="T:System.String" /> class objects. </summary>
|
||||
/// <param name="from">A <see cref="T:System.String" /> that contains the address of the sender of the e-mail message.</param>
|
||||
/// <param name="to">A <see cref="T:System.String" /> that contains the addresses of the recipients of the e-mail message.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="from" /> is null.-or-<paramref name="to" /> is null.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="from" /> is <see cref="F:System.String.Empty" /> ("").-or-<paramref name="to" /> is <see cref="F:System.String.Empty" /> ("").</exception>
|
||||
/// <exception cref="T:System.FormatException">
|
||||
/// <paramref name="from" /> or <paramref name="to" /> is malformed.</exception>
|
||||
// Token: 0x06000AE1 RID: 2785 RVA: 0x00020934 File Offset: 0x0001EB34
|
||||
public MailMessage(string from, string to)
|
||||
: this()
|
||||
{
|
||||
if (from == null || from == string.Empty)
|
||||
{
|
||||
throw new ArgumentNullException("from");
|
||||
}
|
||||
if (to == null || to == string.Empty)
|
||||
{
|
||||
throw new ArgumentNullException("to");
|
||||
}
|
||||
this.from = new MailAddress(from);
|
||||
foreach (string text in to.Split(new char[] { ',' }))
|
||||
{
|
||||
this.to.Add(new MailAddress(text.Trim()));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Net.Mail.MailMessage" /> class. </summary>
|
||||
/// <param name="from">A <see cref="T:System.String" /> that contains the address of the sender of the e-mail message.</param>
|
||||
/// <param name="to">A <see cref="T:System.String" /> that contains the address of the recipient of the e-mail message.</param>
|
||||
/// <param name="subject">A <see cref="T:System.String" /> that contains the subject text.</param>
|
||||
/// <param name="body">A <see cref="T:System.String" /> that contains the message body.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="from" /> is null.-or-<paramref name="to" /> is null.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="from" /> is <see cref="F:System.String.Empty" /> ("").-or-<paramref name="to" /> is <see cref="F:System.String.Empty" /> ("").</exception>
|
||||
/// <exception cref="T:System.FormatException">
|
||||
/// <paramref name="from" /> or <paramref name="to" /> is malformed.</exception>
|
||||
// Token: 0x06000AE2 RID: 2786 RVA: 0x000209D8 File Offset: 0x0001EBD8
|
||||
public MailMessage(string from, string to, string subject, string body)
|
||||
: this()
|
||||
{
|
||||
if (from == null || from == string.Empty)
|
||||
{
|
||||
throw new ArgumentNullException("from");
|
||||
}
|
||||
if (to == null || to == string.Empty)
|
||||
{
|
||||
throw new ArgumentNullException("to");
|
||||
}
|
||||
this.from = new MailAddress(from);
|
||||
foreach (string text in to.Split(new char[] { ',' }))
|
||||
{
|
||||
this.to.Add(new MailAddress(text.Trim()));
|
||||
}
|
||||
this.Body = body;
|
||||
this.Subject = subject;
|
||||
}
|
||||
|
||||
/// <summary>Gets the attachment collection used to store alternate forms of the message body.</summary>
|
||||
/// <returns>A writable <see cref="T:System.Net.Mail.AlternateViewCollection" />.</returns>
|
||||
// Token: 0x170002B9 RID: 697
|
||||
// (get) Token: 0x06000AE3 RID: 2787 RVA: 0x00020A88 File Offset: 0x0001EC88
|
||||
public AlternateViewCollection AlternateViews
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.alternateViews;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the attachment collection used to store data attached to this e-mail message.</summary>
|
||||
/// <returns>A writable <see cref="T:System.Net.Mail.AttachmentCollection" />.</returns>
|
||||
// Token: 0x170002BA RID: 698
|
||||
// (get) Token: 0x06000AE4 RID: 2788 RVA: 0x00020A90 File Offset: 0x0001EC90
|
||||
public AttachmentCollection Attachments
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.attachments;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the address collection that contains the blind carbon copy (BCC) recipients for this e-mail message.</summary>
|
||||
/// <returns>A writable <see cref="T:System.Net.Mail.MailAddressCollection" /> object.</returns>
|
||||
// Token: 0x170002BB RID: 699
|
||||
// (get) Token: 0x06000AE5 RID: 2789 RVA: 0x00020A98 File Offset: 0x0001EC98
|
||||
public MailAddressCollection Bcc
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.bcc;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the message body.</summary>
|
||||
/// <returns>A <see cref="T:System.String" /> value that contains the body text.</returns>
|
||||
// Token: 0x170002BC RID: 700
|
||||
// (get) Token: 0x06000AE6 RID: 2790 RVA: 0x00020AA0 File Offset: 0x0001ECA0
|
||||
// (set) Token: 0x06000AE7 RID: 2791 RVA: 0x00020AA8 File Offset: 0x0001ECA8
|
||||
public string Body
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.body;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value != null && this.bodyEncoding == null)
|
||||
{
|
||||
this.bodyEncoding = this.GuessEncoding(value) ?? Encoding.ASCII;
|
||||
}
|
||||
this.body = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170002BD RID: 701
|
||||
// (get) Token: 0x06000AE8 RID: 2792 RVA: 0x00020ADC File Offset: 0x0001ECDC
|
||||
internal global::System.Net.Mime.ContentType BodyContentType
|
||||
{
|
||||
get
|
||||
{
|
||||
return new global::System.Net.Mime.ContentType((!this.isHtml) ? "text/plain" : "text/html")
|
||||
{
|
||||
CharSet = (this.BodyEncoding ?? Encoding.ASCII).HeaderName
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170002BE RID: 702
|
||||
// (get) Token: 0x06000AE9 RID: 2793 RVA: 0x00020B28 File Offset: 0x0001ED28
|
||||
internal global::System.Net.Mime.TransferEncoding ContentTransferEncoding
|
||||
{
|
||||
get
|
||||
{
|
||||
return global::System.Net.Mime.ContentType.GuessTransferEncoding(this.BodyEncoding);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the encoding used to encode the message body.</summary>
|
||||
/// <returns>An <see cref="T:System.Text.Encoding" /> applied to the contents of the <see cref="P:System.Net.Mail.MailMessage.Body" />.</returns>
|
||||
// Token: 0x170002BF RID: 703
|
||||
// (get) Token: 0x06000AEA RID: 2794 RVA: 0x00020B38 File Offset: 0x0001ED38
|
||||
// (set) Token: 0x06000AEB RID: 2795 RVA: 0x00020B40 File Offset: 0x0001ED40
|
||||
public Encoding BodyEncoding
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.bodyEncoding;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.bodyEncoding = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the address collection that contains the carbon copy (CC) recipients for this e-mail message.</summary>
|
||||
/// <returns>A writable <see cref="T:System.Net.Mail.MailAddressCollection" /> object.</returns>
|
||||
// Token: 0x170002C0 RID: 704
|
||||
// (get) Token: 0x06000AEC RID: 2796 RVA: 0x00020B4C File Offset: 0x0001ED4C
|
||||
public MailAddressCollection CC
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.cc;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the delivery notifications for this e-mail message.</summary>
|
||||
/// <returns>A <see cref="T:System.Net.Mail.DeliveryNotificationOptions" /> value that contains the delivery notifications for this message.</returns>
|
||||
// Token: 0x170002C1 RID: 705
|
||||
// (get) Token: 0x06000AED RID: 2797 RVA: 0x00020B54 File Offset: 0x0001ED54
|
||||
// (set) Token: 0x06000AEE RID: 2798 RVA: 0x00020B5C File Offset: 0x0001ED5C
|
||||
public DeliveryNotificationOptions DeliveryNotificationOptions
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.deliveryNotificationOptions;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.deliveryNotificationOptions = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the from address for this e-mail message.</summary>
|
||||
/// <returns>A <see cref="T:System.Net.Mail.MailAddress" /> that contains the from address information.</returns>
|
||||
// Token: 0x170002C2 RID: 706
|
||||
// (get) Token: 0x06000AEF RID: 2799 RVA: 0x00020B68 File Offset: 0x0001ED68
|
||||
// (set) Token: 0x06000AF0 RID: 2800 RVA: 0x00020B70 File Offset: 0x0001ED70
|
||||
public MailAddress From
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.from;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.from = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the e-mail headers that are transmitted with this e-mail message.</summary>
|
||||
/// <returns>A <see cref="T:System.Collections.Specialized.NameValueCollection" /> that contains the e-mail headers.</returns>
|
||||
// Token: 0x170002C3 RID: 707
|
||||
// (get) Token: 0x06000AF1 RID: 2801 RVA: 0x00020B7C File Offset: 0x0001ED7C
|
||||
public global::System.Collections.Specialized.NameValueCollection Headers
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.headers;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets a value indicating whether the mail message body is in Html.</summary>
|
||||
/// <returns>true if the message body is in Html; else false. The default is false.</returns>
|
||||
// Token: 0x170002C4 RID: 708
|
||||
// (get) Token: 0x06000AF2 RID: 2802 RVA: 0x00020B84 File Offset: 0x0001ED84
|
||||
// (set) Token: 0x06000AF3 RID: 2803 RVA: 0x00020B8C File Offset: 0x0001ED8C
|
||||
public bool IsBodyHtml
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.isHtml;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.isHtml = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the priority of this e-mail message.</summary>
|
||||
/// <returns>A <see cref="T:System.Net.Mail.MailPriority" /> that contains the priority of this message.</returns>
|
||||
// Token: 0x170002C5 RID: 709
|
||||
// (get) Token: 0x06000AF4 RID: 2804 RVA: 0x00020B98 File Offset: 0x0001ED98
|
||||
// (set) Token: 0x06000AF5 RID: 2805 RVA: 0x00020BA0 File Offset: 0x0001EDA0
|
||||
public MailPriority Priority
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.priority;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.priority = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170002C6 RID: 710
|
||||
// (get) Token: 0x06000AF6 RID: 2806 RVA: 0x00020BAC File Offset: 0x0001EDAC
|
||||
// (set) Token: 0x06000AF7 RID: 2807 RVA: 0x00020BB4 File Offset: 0x0001EDB4
|
||||
internal Encoding HeadersEncoding
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.headersEncoding;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.headersEncoding = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170002C7 RID: 711
|
||||
// (get) Token: 0x06000AF8 RID: 2808 RVA: 0x00020BC0 File Offset: 0x0001EDC0
|
||||
internal MailAddressCollection ReplyToList
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.replyTo;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the ReplyTo address for the mail message.</summary>
|
||||
/// <returns>A MailAddress that indicates the value of the <see cref="P:System.Net.Mail.MailMessage.ReplyTo" /> field.</returns>
|
||||
// Token: 0x170002C8 RID: 712
|
||||
// (get) Token: 0x06000AF9 RID: 2809 RVA: 0x00020BC8 File Offset: 0x0001EDC8
|
||||
// (set) Token: 0x06000AFA RID: 2810 RVA: 0x00020BE8 File Offset: 0x0001EDE8
|
||||
public MailAddress ReplyTo
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.replyTo.Count == 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return this.replyTo[0];
|
||||
}
|
||||
set
|
||||
{
|
||||
this.replyTo.Clear();
|
||||
this.replyTo.Add(value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the sender's address for this e-mail message.</summary>
|
||||
/// <returns>A <see cref="T:System.Net.Mail.MailAddress" /> that contains the sender's address information.</returns>
|
||||
// Token: 0x170002C9 RID: 713
|
||||
// (get) Token: 0x06000AFB RID: 2811 RVA: 0x00020C04 File Offset: 0x0001EE04
|
||||
// (set) Token: 0x06000AFC RID: 2812 RVA: 0x00020C0C File Offset: 0x0001EE0C
|
||||
public MailAddress Sender
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.sender;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.sender = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the subject line for this e-mail message.</summary>
|
||||
/// <returns>A <see cref="T:System.String" /> that contains the subject content.</returns>
|
||||
// Token: 0x170002CA RID: 714
|
||||
// (get) Token: 0x06000AFD RID: 2813 RVA: 0x00020C18 File Offset: 0x0001EE18
|
||||
// (set) Token: 0x06000AFE RID: 2814 RVA: 0x00020C20 File Offset: 0x0001EE20
|
||||
public string Subject
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.subject;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value != null && this.subjectEncoding == null)
|
||||
{
|
||||
this.subjectEncoding = this.GuessEncoding(value);
|
||||
}
|
||||
this.subject = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the encoding used for the subject content for this e-mail message.</summary>
|
||||
/// <returns>An <see cref="T:System.Text.Encoding" /> that was used to encode the <see cref="P:System.Net.Mail.MailMessage.Subject" /> property.</returns>
|
||||
// Token: 0x170002CB RID: 715
|
||||
// (get) Token: 0x06000AFF RID: 2815 RVA: 0x00020C48 File Offset: 0x0001EE48
|
||||
// (set) Token: 0x06000B00 RID: 2816 RVA: 0x00020C50 File Offset: 0x0001EE50
|
||||
public Encoding SubjectEncoding
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.subjectEncoding;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.subjectEncoding = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the address collection that contains the recipients of this e-mail message.</summary>
|
||||
/// <returns>A writable <see cref="T:System.Net.Mail.MailAddressCollection" /> object.</returns>
|
||||
// Token: 0x170002CC RID: 716
|
||||
// (get) Token: 0x06000B01 RID: 2817 RVA: 0x00020C5C File Offset: 0x0001EE5C
|
||||
public MailAddressCollection To
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.to;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Releases all resources used by the <see cref="T:System.Net.Mail.MailMessage" />. </summary>
|
||||
// Token: 0x06000B02 RID: 2818 RVA: 0x00020C64 File Offset: 0x0001EE64
|
||||
public void Dispose()
|
||||
{
|
||||
this.Dispose(true);
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
/// <summary>Releases the unmanaged resources used by the <see cref="T:System.Net.Mail.MailMessage" /> and optionally releases the managed resources. </summary>
|
||||
/// <param name="disposing">true to release both managed and unmanaged resources; false to release only unmanaged resources. </param>
|
||||
// Token: 0x06000B03 RID: 2819 RVA: 0x00020C74 File Offset: 0x0001EE74
|
||||
protected virtual void Dispose(bool disposing)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06000B04 RID: 2820 RVA: 0x00020C78 File Offset: 0x0001EE78
|
||||
private Encoding GuessEncoding(string s)
|
||||
{
|
||||
return global::System.Net.Mime.ContentType.GuessEncoding(s);
|
||||
}
|
||||
|
||||
// Token: 0x04000B09 RID: 2825
|
||||
private AlternateViewCollection alternateViews;
|
||||
|
||||
// Token: 0x04000B0A RID: 2826
|
||||
private AttachmentCollection attachments;
|
||||
|
||||
// Token: 0x04000B0B RID: 2827
|
||||
private MailAddressCollection bcc;
|
||||
|
||||
// Token: 0x04000B0C RID: 2828
|
||||
private MailAddressCollection replyTo;
|
||||
|
||||
// Token: 0x04000B0D RID: 2829
|
||||
private string body;
|
||||
|
||||
// Token: 0x04000B0E RID: 2830
|
||||
private MailPriority priority;
|
||||
|
||||
// Token: 0x04000B0F RID: 2831
|
||||
private MailAddress sender;
|
||||
|
||||
// Token: 0x04000B10 RID: 2832
|
||||
private DeliveryNotificationOptions deliveryNotificationOptions;
|
||||
|
||||
// Token: 0x04000B11 RID: 2833
|
||||
private MailAddressCollection cc;
|
||||
|
||||
// Token: 0x04000B12 RID: 2834
|
||||
private MailAddress from;
|
||||
|
||||
// Token: 0x04000B13 RID: 2835
|
||||
private global::System.Collections.Specialized.NameValueCollection headers;
|
||||
|
||||
// Token: 0x04000B14 RID: 2836
|
||||
private MailAddressCollection to;
|
||||
|
||||
// Token: 0x04000B15 RID: 2837
|
||||
private string subject;
|
||||
|
||||
// Token: 0x04000B16 RID: 2838
|
||||
private Encoding subjectEncoding;
|
||||
|
||||
// Token: 0x04000B17 RID: 2839
|
||||
private Encoding bodyEncoding;
|
||||
|
||||
// Token: 0x04000B18 RID: 2840
|
||||
private Encoding headersEncoding = Encoding.UTF8;
|
||||
|
||||
// Token: 0x04000B19 RID: 2841
|
||||
private bool isHtml;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.Mail
|
||||
{
|
||||
/// <summary>Specifies the priority of a <see cref="T:System.Net.Mail.MailMessage" />.</summary>
|
||||
// Token: 0x02000141 RID: 321
|
||||
public enum MailPriority
|
||||
{
|
||||
/// <summary>The email has normal priority.</summary>
|
||||
// Token: 0x04000B1B RID: 2843
|
||||
Normal,
|
||||
/// <summary>The email has low priority.</summary>
|
||||
// Token: 0x04000B1C RID: 2844
|
||||
Low,
|
||||
/// <summary>The email has high priority.</summary>
|
||||
// Token: 0x04000B1D RID: 2845
|
||||
High
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace System.Net.Mail
|
||||
{
|
||||
/// <summary>Represents the method that will handle the <see cref="E:System.Net.Mail.SmtpClient.SendCompleted" /> event.</summary>
|
||||
/// <param name="sender">The source of the event.</param>
|
||||
/// <param name="e">An <see cref="T:System.ComponentModel.AsyncCompletedEventArgs" /> containing event data.</param>
|
||||
// Token: 0x0200032D RID: 813
|
||||
// (Invoke) Token: 0x06001C8D RID: 7309
|
||||
public delegate void SendCompletedEventHandler(object sender, global::System.ComponentModel.AsyncCompletedEventArgs e);
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.Mail
|
||||
{
|
||||
/// <summary>Specifies the level of access allowed to a Simple Mail Transport Protocol (SMTP) server.</summary>
|
||||
// Token: 0x02000142 RID: 322
|
||||
public enum SmtpAccess
|
||||
{
|
||||
/// <summary>No access to an SMTP host.</summary>
|
||||
// Token: 0x04000B1F RID: 2847
|
||||
None,
|
||||
/// <summary>Connection to an SMTP host on the default port (port 25).</summary>
|
||||
// Token: 0x04000B20 RID: 2848
|
||||
Connect,
|
||||
/// <summary>Connection to an SMTP host on any port.</summary>
|
||||
// Token: 0x04000B21 RID: 2849
|
||||
ConnectToUnrestrictedPort
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,1528 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Net.Mime;
|
||||
using System.Net.Security;
|
||||
using System.Net.Sockets;
|
||||
using System.Security.Authentication;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
|
||||
namespace System.Net.Mail
|
||||
{
|
||||
/// <summary>Allows applications to send e-mail by using the Simple Mail Transfer Protocol (SMTP).</summary>
|
||||
// Token: 0x02000143 RID: 323
|
||||
public class SmtpClient
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Net.Mail.SmtpClient" /> class by using configuration file settings. </summary>
|
||||
// Token: 0x06000B05 RID: 2821 RVA: 0x00020C80 File Offset: 0x0001EE80
|
||||
public SmtpClient()
|
||||
: this(null, 0)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Net.Mail.SmtpClient" /> class that sends e-mail by using the specified SMTP server. </summary>
|
||||
/// <param name="host">A <see cref="T:System.String" /> that contains the name or IP address of the host computer used for SMTP transactions.</param>
|
||||
// Token: 0x06000B06 RID: 2822 RVA: 0x00020C8C File Offset: 0x0001EE8C
|
||||
public SmtpClient(string host)
|
||||
: this(host, 0)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Net.Mail.SmtpClient" /> class that sends e-mail by using the specified SMTP server and port.</summary>
|
||||
/// <param name="host">A <see cref="T:System.String" /> that contains the name or IP address of the host used for SMTP transactions.</param>
|
||||
/// <param name="port">An <see cref="T:System.Int32" /> greater than zero that contains the port to be used on <paramref name="host" />.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="port" /> cannot be less than zero.</exception>
|
||||
// Token: 0x06000B07 RID: 2823 RVA: 0x00020C98 File Offset: 0x0001EE98
|
||||
public SmtpClient(string host, int port)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(host))
|
||||
{
|
||||
this.host = host;
|
||||
}
|
||||
if (port != 0)
|
||||
{
|
||||
this.port = port;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Occurs when an asynchronous e-mail send operation completes.</summary>
|
||||
// Token: 0x14000022 RID: 34
|
||||
// (add) Token: 0x06000B08 RID: 2824 RVA: 0x00020D04 File Offset: 0x0001EF04
|
||||
// (remove) Token: 0x06000B09 RID: 2825 RVA: 0x00020D20 File Offset: 0x0001EF20
|
||||
public event SendCompletedEventHandler SendCompleted;
|
||||
|
||||
/// <summary>Specify which certificates should be used to establish the Secure Sockets Layer (SSL) connection.</summary>
|
||||
/// <returns>An <see cref="T:System.Security.Cryptography.X509Certificates.X509CertificateCollection" />, holding one or more client certificates. The default value is derived from the mail configuration attributes in a configuration file.</returns>
|
||||
// Token: 0x170002CD RID: 717
|
||||
// (get) Token: 0x06000B0A RID: 2826 RVA: 0x00020D3C File Offset: 0x0001EF3C
|
||||
[global::System.MonoTODO("Client certificates not used")]
|
||||
public global::System.Security.Cryptography.X509Certificates.X509CertificateCollection ClientCertificates
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.clientCertificates == null)
|
||||
{
|
||||
this.clientCertificates = new global::System.Security.Cryptography.X509Certificates.X509CertificateCollection();
|
||||
}
|
||||
return this.clientCertificates;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the Service Provider Name (SPN) to use for authentication when using extended protection.</summary>
|
||||
/// <returns>A <see cref="T:System.String" /> that specifies the SPN to use for extended protection. The default value for this SPN is of the form "SMTPSVC/<host>" where <host> is the hostname of the SMTP mail server. </returns>
|
||||
// Token: 0x170002CE RID: 718
|
||||
// (get) Token: 0x06000B0B RID: 2827 RVA: 0x00020D5C File Offset: 0x0001EF5C
|
||||
// (set) Token: 0x06000B0C RID: 2828 RVA: 0x00020D64 File Offset: 0x0001EF64
|
||||
private string TargetName { get; set; }
|
||||
|
||||
/// <summary>Gets or sets the credentials used to authenticate the sender.</summary>
|
||||
/// <returns>An <see cref="T:System.Net.ICredentialsByHost" /> that represents the credentials to use for authentication; or null if no credentials have been specified.</returns>
|
||||
/// <exception cref="T:System.InvalidOperationException">You cannot change the value of this property when an email is being sent.</exception>
|
||||
// Token: 0x170002CF RID: 719
|
||||
// (get) Token: 0x06000B0D RID: 2829 RVA: 0x00020D70 File Offset: 0x0001EF70
|
||||
// (set) Token: 0x06000B0E RID: 2830 RVA: 0x00020D78 File Offset: 0x0001EF78
|
||||
public ICredentialsByHost Credentials
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.credentials;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.CheckState();
|
||||
this.credentials = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Specifies how outgoing email messages will be handled.</summary>
|
||||
/// <returns>An <see cref="T:System.Net.Mail.SmtpDeliveryMethod" /> that indicates how email messages are delivered.</returns>
|
||||
// Token: 0x170002D0 RID: 720
|
||||
// (get) Token: 0x06000B0F RID: 2831 RVA: 0x00020D88 File Offset: 0x0001EF88
|
||||
// (set) Token: 0x06000B10 RID: 2832 RVA: 0x00020D90 File Offset: 0x0001EF90
|
||||
public SmtpDeliveryMethod DeliveryMethod
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.deliveryMethod;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.CheckState();
|
||||
this.deliveryMethod = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Specify whether the <see cref="T:System.Net.Mail.SmtpClient" /> uses Secure Sockets Layer (SSL) to encrypt the connection.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Net.Mail.SmtpClient" /> uses SSL; otherwise, false. The default is false.</returns>
|
||||
// Token: 0x170002D1 RID: 721
|
||||
// (get) Token: 0x06000B11 RID: 2833 RVA: 0x00020DA0 File Offset: 0x0001EFA0
|
||||
// (set) Token: 0x06000B12 RID: 2834 RVA: 0x00020DA8 File Offset: 0x0001EFA8
|
||||
public bool EnableSsl
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.enableSsl;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.CheckState();
|
||||
this.enableSsl = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the name or IP address of the host used for SMTP transactions.</summary>
|
||||
/// <returns>A <see cref="T:System.String" /> that contains the name or IP address of the computer to use for SMTP transactions.</returns>
|
||||
/// <exception cref="T:System.ArgumentNullException">The value specified for a set operation is null.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">The value specified for a set operation is equal to <see cref="F:System.String.Empty" /> ("").</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">You cannot change the value of this property when an email is being sent.</exception>
|
||||
// Token: 0x170002D2 RID: 722
|
||||
// (get) Token: 0x06000B13 RID: 2835 RVA: 0x00020DB8 File Offset: 0x0001EFB8
|
||||
// (set) Token: 0x06000B14 RID: 2836 RVA: 0x00020DC0 File Offset: 0x0001EFC0
|
||||
public string Host
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.host;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
throw new ArgumentNullException("value");
|
||||
}
|
||||
if (value.Length == 0)
|
||||
{
|
||||
throw new ArgumentException("An empty string is not allowed.", "value");
|
||||
}
|
||||
this.CheckState();
|
||||
this.host = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the folder where applications save mail messages to be processed by the local SMTP server.</summary>
|
||||
/// <returns>A <see cref="T:System.String" /> that specifies the pickup directory for mail messages.</returns>
|
||||
// Token: 0x170002D3 RID: 723
|
||||
// (get) Token: 0x06000B15 RID: 2837 RVA: 0x00020DFC File Offset: 0x0001EFFC
|
||||
// (set) Token: 0x06000B16 RID: 2838 RVA: 0x00020E04 File Offset: 0x0001F004
|
||||
public string PickupDirectoryLocation
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.pickupDirectoryLocation;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.pickupDirectoryLocation = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the port used for SMTP transactions.</summary>
|
||||
/// <returns>An <see cref="T:System.Int32" /> that contains the port number on the SMTP host. The default value is 25.</returns>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">The value specified for a set operation is less than or equal to zero.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">You cannot change the value of this property when an email is being sent.</exception>
|
||||
// Token: 0x170002D4 RID: 724
|
||||
// (get) Token: 0x06000B17 RID: 2839 RVA: 0x00020E10 File Offset: 0x0001F010
|
||||
// (set) Token: 0x06000B18 RID: 2840 RVA: 0x00020E18 File Offset: 0x0001F018
|
||||
public int Port
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.port;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value <= 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("value");
|
||||
}
|
||||
this.CheckState();
|
||||
this.port = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the network connection used to transmit the e-mail message.</summary>
|
||||
/// <returns>A <see cref="T:System.Net.ServicePoint" /> that connects to the <see cref="P:System.Net.Mail.SmtpClient.Host" /> property used for SMTP.</returns>
|
||||
/// <exception cref="T:System.InvalidOperationException">
|
||||
/// <see cref="P:System.Net.Mail.SmtpClient.Host" /> is null or the empty string ("").-or-<see cref="P:System.Net.Mail.SmtpClient.Port" /> is zero.</exception>
|
||||
// Token: 0x170002D5 RID: 725
|
||||
// (get) Token: 0x06000B19 RID: 2841 RVA: 0x00020E3C File Offset: 0x0001F03C
|
||||
[global::System.MonoTODO]
|
||||
public ServicePoint ServicePoint
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets a value that specifies the amount of time after which a synchronous <see cref="Overload:System.Net.Mail.SmtpClient.Send" /> call times out.</summary>
|
||||
/// <returns>An <see cref="T:System.Int32" /> that specifies the time-out value in milliseconds. The default value is 100,000 (100 seconds).</returns>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">The value specified for a set operation was less than zero.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">You cannot change the value of this property when an email is being sent.</exception>
|
||||
// Token: 0x170002D6 RID: 726
|
||||
// (get) Token: 0x06000B1A RID: 2842 RVA: 0x00020E44 File Offset: 0x0001F044
|
||||
// (set) Token: 0x06000B1B RID: 2843 RVA: 0x00020E4C File Offset: 0x0001F04C
|
||||
public int Timeout
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.timeout;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value < 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("value");
|
||||
}
|
||||
this.CheckState();
|
||||
this.timeout = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets a <see cref="T:System.Boolean" /> value that controls whether the <see cref="P:System.Net.CredentialCache.DefaultCredentials" /> are sent with requests.</summary>
|
||||
/// <returns>true if the default credentials are used; otherwise false. The default value is false.</returns>
|
||||
/// <exception cref="T:System.InvalidOperationException">You cannot change the value of this property when an e-mail is being sent.</exception>
|
||||
// Token: 0x170002D7 RID: 727
|
||||
// (get) Token: 0x06000B1C RID: 2844 RVA: 0x00020E70 File Offset: 0x0001F070
|
||||
// (set) Token: 0x06000B1D RID: 2845 RVA: 0x00020E74 File Offset: 0x0001F074
|
||||
public bool UseDefaultCredentials
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
[global::System.MonoNotSupported("no DefaultCredential support in Mono")]
|
||||
set
|
||||
{
|
||||
if (value)
|
||||
{
|
||||
throw new NotImplementedException("Default credentials are not supported");
|
||||
}
|
||||
this.CheckState();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000B1E RID: 2846 RVA: 0x00020E90 File Offset: 0x0001F090
|
||||
private void CheckState()
|
||||
{
|
||||
if (this.messageInProcess != null)
|
||||
{
|
||||
throw new InvalidOperationException("Cannot set Timeout while Sending a message");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000B1F RID: 2847 RVA: 0x00020EA8 File Offset: 0x0001F0A8
|
||||
private static string EncodeAddress(MailAddress address)
|
||||
{
|
||||
string text = global::System.Net.Mime.ContentType.EncodeSubjectRFC2047(address.DisplayName, Encoding.UTF8);
|
||||
return string.Concat(new string[] { "\"", text, "\" <", address.Address, ">" });
|
||||
}
|
||||
|
||||
// Token: 0x06000B20 RID: 2848 RVA: 0x00020EF8 File Offset: 0x0001F0F8
|
||||
private static string EncodeAddresses(MailAddressCollection addresses)
|
||||
{
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
bool flag = true;
|
||||
foreach (MailAddress mailAddress in addresses)
|
||||
{
|
||||
if (!flag)
|
||||
{
|
||||
stringBuilder.Append(", ");
|
||||
}
|
||||
stringBuilder.Append(SmtpClient.EncodeAddress(mailAddress));
|
||||
flag = false;
|
||||
}
|
||||
return stringBuilder.ToString();
|
||||
}
|
||||
|
||||
// Token: 0x06000B21 RID: 2849 RVA: 0x00020F80 File Offset: 0x0001F180
|
||||
private string EncodeSubjectRFC2047(MailMessage message)
|
||||
{
|
||||
return global::System.Net.Mime.ContentType.EncodeSubjectRFC2047(message.Subject, message.SubjectEncoding);
|
||||
}
|
||||
|
||||
// Token: 0x06000B22 RID: 2850 RVA: 0x00020F94 File Offset: 0x0001F194
|
||||
private string EncodeBody(MailMessage message)
|
||||
{
|
||||
string body = message.Body;
|
||||
Encoding bodyEncoding = message.BodyEncoding;
|
||||
global::System.Net.Mime.TransferEncoding contentTransferEncoding = message.ContentTransferEncoding;
|
||||
if (contentTransferEncoding == global::System.Net.Mime.TransferEncoding.Base64)
|
||||
{
|
||||
return Convert.ToBase64String(bodyEncoding.GetBytes(body), Base64FormattingOptions.InsertLineBreaks);
|
||||
}
|
||||
if (contentTransferEncoding != global::System.Net.Mime.TransferEncoding.SevenBit)
|
||||
{
|
||||
return this.ToQuotedPrintable(body, bodyEncoding);
|
||||
}
|
||||
return body;
|
||||
}
|
||||
|
||||
// Token: 0x06000B23 RID: 2851 RVA: 0x00020FE4 File Offset: 0x0001F1E4
|
||||
private string EncodeBody(AlternateView av)
|
||||
{
|
||||
byte[] array = new byte[av.ContentStream.Length];
|
||||
av.ContentStream.Read(array, 0, array.Length);
|
||||
global::System.Net.Mime.TransferEncoding transferEncoding = av.TransferEncoding;
|
||||
if (transferEncoding == global::System.Net.Mime.TransferEncoding.Base64)
|
||||
{
|
||||
return Convert.ToBase64String(array, Base64FormattingOptions.InsertLineBreaks);
|
||||
}
|
||||
if (transferEncoding != global::System.Net.Mime.TransferEncoding.SevenBit)
|
||||
{
|
||||
return this.ToQuotedPrintable(array);
|
||||
}
|
||||
return Encoding.ASCII.GetString(array);
|
||||
}
|
||||
|
||||
// Token: 0x06000B24 RID: 2852 RVA: 0x0002104C File Offset: 0x0001F24C
|
||||
private void EndSection(string section)
|
||||
{
|
||||
this.SendData(string.Format("--{0}--", section));
|
||||
this.SendData(string.Empty);
|
||||
}
|
||||
|
||||
// Token: 0x06000B25 RID: 2853 RVA: 0x0002106C File Offset: 0x0001F26C
|
||||
private string GenerateBoundary()
|
||||
{
|
||||
string text = SmtpClient.GenerateBoundary(this.boundaryIndex);
|
||||
this.boundaryIndex++;
|
||||
return text;
|
||||
}
|
||||
|
||||
// Token: 0x06000B26 RID: 2854 RVA: 0x00021094 File Offset: 0x0001F294
|
||||
private static string GenerateBoundary(int index)
|
||||
{
|
||||
return string.Format("--boundary_{0}_{1}", index, Guid.NewGuid().ToString("D"));
|
||||
}
|
||||
|
||||
// Token: 0x06000B27 RID: 2855 RVA: 0x000210C4 File Offset: 0x0001F2C4
|
||||
private bool IsError(SmtpClient.SmtpResponse status)
|
||||
{
|
||||
return status.StatusCode >= (SmtpStatusCode)400;
|
||||
}
|
||||
|
||||
/// <summary>Raises the <see cref="E:System.Net.Mail.SmtpClient.SendCompleted" /> event.</summary>
|
||||
/// <param name="e">An <see cref="T:System.ComponentModel.AsyncCompletedEventArgs" /> that contains event data.</param>
|
||||
// Token: 0x06000B28 RID: 2856 RVA: 0x000210D8 File Offset: 0x0001F2D8
|
||||
protected void OnSendCompleted(global::System.ComponentModel.AsyncCompletedEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (this.SendCompleted != null)
|
||||
{
|
||||
this.SendCompleted(this, e);
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
this.worker = null;
|
||||
this.user_async_state = null;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000B29 RID: 2857 RVA: 0x00021130 File Offset: 0x0001F330
|
||||
private void CheckCancellation()
|
||||
{
|
||||
if (this.worker != null && this.worker.CancellationPending)
|
||||
{
|
||||
throw new SmtpClient.CancellationException();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000B2A RID: 2858 RVA: 0x00021154 File Offset: 0x0001F354
|
||||
private SmtpClient.SmtpResponse Read()
|
||||
{
|
||||
byte[] array = new byte[512];
|
||||
int num = 0;
|
||||
bool flag = false;
|
||||
do
|
||||
{
|
||||
this.CheckCancellation();
|
||||
int num2 = this.stream.Read(array, num, array.Length - num);
|
||||
if (num2 <= 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
int num3 = num + num2 - 1;
|
||||
if (num3 > 4 && (array[num3] == 10 || array[num3] == 13))
|
||||
{
|
||||
int num4 = num3 - 3;
|
||||
while (num4 >= 0 && array[num4] != 10 && array[num4] != 13)
|
||||
{
|
||||
num4--;
|
||||
}
|
||||
flag = array[num4 + 4] == 32;
|
||||
}
|
||||
num += num2;
|
||||
if (num == array.Length)
|
||||
{
|
||||
byte[] array2 = new byte[array.Length * 2];
|
||||
Array.Copy(array, 0, array2, 0, array.Length);
|
||||
array = array2;
|
||||
}
|
||||
}
|
||||
while (!flag);
|
||||
if (num > 0)
|
||||
{
|
||||
Encoding encoding = new ASCIIEncoding();
|
||||
string @string = encoding.GetString(array, 0, num - 1);
|
||||
return SmtpClient.SmtpResponse.Parse(@string);
|
||||
}
|
||||
throw new IOException("Connection closed");
|
||||
}
|
||||
|
||||
// Token: 0x06000B2B RID: 2859 RVA: 0x00021264 File Offset: 0x0001F464
|
||||
private void ResetExtensions()
|
||||
{
|
||||
this.authMechs = SmtpClient.AuthMechs.None;
|
||||
}
|
||||
|
||||
// Token: 0x06000B2C RID: 2860 RVA: 0x00021270 File Offset: 0x0001F470
|
||||
private void ParseExtensions(string extens)
|
||||
{
|
||||
char[] array = new char[] { ' ' };
|
||||
string[] array2 = extens.Split(new char[] { '\n' });
|
||||
foreach (string text in array2)
|
||||
{
|
||||
if (text.Length >= 4)
|
||||
{
|
||||
string text2 = text.Substring(4);
|
||||
if (text2.StartsWith("AUTH ", StringComparison.Ordinal))
|
||||
{
|
||||
string[] array4 = text2.Split(array);
|
||||
for (int j = 1; j < array4.Length; j++)
|
||||
{
|
||||
string text3 = array4[j].Trim();
|
||||
string text4 = text3;
|
||||
switch (text4)
|
||||
{
|
||||
case "CRAM-MD5":
|
||||
this.authMechs |= SmtpClient.AuthMechs.CramMD5;
|
||||
break;
|
||||
case "DIGEST-MD5":
|
||||
this.authMechs |= SmtpClient.AuthMechs.DigestMD5;
|
||||
break;
|
||||
case "GSSAPI":
|
||||
this.authMechs |= SmtpClient.AuthMechs.GssAPI;
|
||||
break;
|
||||
case "KERBEROS_V4":
|
||||
this.authMechs |= SmtpClient.AuthMechs.Kerberos4;
|
||||
break;
|
||||
case "LOGIN":
|
||||
this.authMechs |= SmtpClient.AuthMechs.Login;
|
||||
break;
|
||||
case "PLAIN":
|
||||
this.authMechs |= SmtpClient.AuthMechs.Plain;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Sends the specified message to an SMTP server for delivery.</summary>
|
||||
/// <param name="message">A <see cref="T:System.Net.Mail.MailMessage" /> that contains the message to send.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <see cref="P:System.Net.Mail.MailMessage.From" /> is null.-or-<see cref="P:System.Net.Mail.MailMessage.To" /> is null.-or- <paramref name="message" /> is null.</exception>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">There are no recipients in <see cref="P:System.Net.Mail.MailMessage.To" />, <see cref="P:System.Net.Mail.MailMessage.CC" />, and <see cref="P:System.Net.Mail.MailMessage.Bcc" />.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">This <see cref="T:System.Net.Mail.SmtpClient" /> has a <see cref="Overload:System.Net.Mail.SmtpClient.SendAsync" /> call in progress.-or- <see cref="P:System.Net.Mail.SmtpClient.Host" /> is null.-or-<see cref="P:System.Net.Mail.SmtpClient.Host" /> is equal to the empty string ("").-or- <see cref="P:System.Net.Mail.SmtpClient.Port" /> is zero.</exception>
|
||||
/// <exception cref="T:System.ObjectDisposedException">This object has been disposed.</exception>
|
||||
/// <exception cref="T:System.Net.Mail.SmtpException">The connection to the SMTP server failed.-or-Authentication failed.-or-The operation timed out.</exception>
|
||||
/// <exception cref="T:System.Net.Mail.SmtpFailedRecipientsException">The message could not be delivered to one or more of the recipients in <see cref="P:System.Net.Mail.MailMessage.To" />, <see cref="P:System.Net.Mail.MailMessage.CC" />, or <see cref="P:System.Net.Mail.MailMessage.Bcc" />.</exception>
|
||||
// Token: 0x06000B2D RID: 2861 RVA: 0x00021434 File Offset: 0x0001F634
|
||||
public void Send(MailMessage message)
|
||||
{
|
||||
if (message == null)
|
||||
{
|
||||
throw new ArgumentNullException("message");
|
||||
}
|
||||
if (this.deliveryMethod == SmtpDeliveryMethod.Network && (this.Host == null || this.Host.Trim().Length == 0))
|
||||
{
|
||||
throw new InvalidOperationException("The SMTP host was not specified");
|
||||
}
|
||||
if (this.deliveryMethod == SmtpDeliveryMethod.PickupDirectoryFromIis)
|
||||
{
|
||||
throw new NotSupportedException("IIS delivery is not supported");
|
||||
}
|
||||
if (this.port == 0)
|
||||
{
|
||||
this.port = 25;
|
||||
}
|
||||
this.mutex.WaitOne();
|
||||
try
|
||||
{
|
||||
this.messageInProcess = message;
|
||||
if (this.deliveryMethod == SmtpDeliveryMethod.SpecifiedPickupDirectory)
|
||||
{
|
||||
this.SendToFile(message);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.SendInternal(message);
|
||||
}
|
||||
}
|
||||
catch (SmtpClient.CancellationException)
|
||||
{
|
||||
}
|
||||
catch (SmtpException)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new SmtpException("Message could not be sent.", ex);
|
||||
}
|
||||
finally
|
||||
{
|
||||
this.mutex.ReleaseMutex();
|
||||
this.messageInProcess = null;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000B2E RID: 2862 RVA: 0x00021580 File Offset: 0x0001F780
|
||||
private void SendInternal(MailMessage message)
|
||||
{
|
||||
this.CheckCancellation();
|
||||
try
|
||||
{
|
||||
this.client = new global::System.Net.Sockets.TcpClient(this.host, this.port);
|
||||
this.stream = this.client.GetStream();
|
||||
this.writer = new StreamWriter(this.stream);
|
||||
this.reader = new StreamReader(this.stream);
|
||||
this.SendCore(message);
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (this.writer != null)
|
||||
{
|
||||
this.writer.Close();
|
||||
}
|
||||
if (this.reader != null)
|
||||
{
|
||||
this.reader.Close();
|
||||
}
|
||||
if (this.stream != null)
|
||||
{
|
||||
this.stream.Close();
|
||||
}
|
||||
if (this.client != null)
|
||||
{
|
||||
this.client.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000B2F RID: 2863 RVA: 0x00021660 File Offset: 0x0001F860
|
||||
private void SendToFile(MailMessage message)
|
||||
{
|
||||
if (!Path.IsPathRooted(this.pickupDirectoryLocation))
|
||||
{
|
||||
throw new SmtpException("Only absolute directories are allowed for pickup directory.");
|
||||
}
|
||||
string text = Path.Combine(this.pickupDirectoryLocation, Guid.NewGuid() + ".eml");
|
||||
try
|
||||
{
|
||||
this.writer = new StreamWriter(text);
|
||||
MailAddress from = message.From;
|
||||
if (from == null)
|
||||
{
|
||||
from = this.defaultFrom;
|
||||
}
|
||||
this.SendHeader("Date", DateTime.Now.ToString("ddd, dd MMM yyyy HH':'mm':'ss zzz", DateTimeFormatInfo.InvariantInfo));
|
||||
this.SendHeader("From", from.ToString());
|
||||
this.SendHeader("To", message.To.ToString());
|
||||
if (message.CC.Count > 0)
|
||||
{
|
||||
this.SendHeader("Cc", message.CC.ToString());
|
||||
}
|
||||
this.SendHeader("Subject", this.EncodeSubjectRFC2047(message));
|
||||
foreach (string text2 in message.Headers.AllKeys)
|
||||
{
|
||||
this.SendHeader(text2, message.Headers[text2]);
|
||||
}
|
||||
this.AddPriorityHeader(message);
|
||||
this.boundaryIndex = 0;
|
||||
if (message.Attachments.Count > 0)
|
||||
{
|
||||
this.SendWithAttachments(message);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.SendWithoutAttachments(message, null, false);
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (this.writer != null)
|
||||
{
|
||||
this.writer.Close();
|
||||
}
|
||||
this.writer = null;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000B30 RID: 2864 RVA: 0x000217FC File Offset: 0x0001F9FC
|
||||
private void SendCore(MailMessage message)
|
||||
{
|
||||
SmtpClient.SmtpResponse smtpResponse = this.Read();
|
||||
if (this.IsError(smtpResponse))
|
||||
{
|
||||
throw new SmtpException(smtpResponse.StatusCode, smtpResponse.Description);
|
||||
}
|
||||
smtpResponse = this.SendCommand("EHLO " + Dns.GetHostName());
|
||||
if (this.IsError(smtpResponse))
|
||||
{
|
||||
smtpResponse = this.SendCommand("HELO " + Dns.GetHostName());
|
||||
if (this.IsError(smtpResponse))
|
||||
{
|
||||
throw new SmtpException(smtpResponse.StatusCode, smtpResponse.Description);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
string description = smtpResponse.Description;
|
||||
if (description != null)
|
||||
{
|
||||
this.ParseExtensions(description);
|
||||
}
|
||||
}
|
||||
if (this.enableSsl)
|
||||
{
|
||||
this.InitiateSecureConnection();
|
||||
this.ResetExtensions();
|
||||
this.writer = new StreamWriter(this.stream);
|
||||
this.reader = new StreamReader(this.stream);
|
||||
smtpResponse = this.SendCommand("EHLO " + Dns.GetHostName());
|
||||
if (this.IsError(smtpResponse))
|
||||
{
|
||||
smtpResponse = this.SendCommand("HELO " + Dns.GetHostName());
|
||||
if (this.IsError(smtpResponse))
|
||||
{
|
||||
throw new SmtpException(smtpResponse.StatusCode, smtpResponse.Description);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
string description2 = smtpResponse.Description;
|
||||
if (description2 != null)
|
||||
{
|
||||
this.ParseExtensions(description2);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (this.authMechs != SmtpClient.AuthMechs.None)
|
||||
{
|
||||
this.Authenticate();
|
||||
}
|
||||
MailAddress from = message.From;
|
||||
if (from == null)
|
||||
{
|
||||
from = this.defaultFrom;
|
||||
}
|
||||
smtpResponse = this.SendCommand("MAIL FROM:<" + from.Address + '>');
|
||||
if (this.IsError(smtpResponse))
|
||||
{
|
||||
throw new SmtpException(smtpResponse.StatusCode, smtpResponse.Description);
|
||||
}
|
||||
List<SmtpFailedRecipientException> list = new List<SmtpFailedRecipientException>();
|
||||
for (int i = 0; i < message.To.Count; i++)
|
||||
{
|
||||
smtpResponse = this.SendCommand("RCPT TO:<" + message.To[i].Address + '>');
|
||||
if (this.IsError(smtpResponse))
|
||||
{
|
||||
list.Add(new SmtpFailedRecipientException(smtpResponse.StatusCode, message.To[i].Address));
|
||||
}
|
||||
}
|
||||
for (int j = 0; j < message.CC.Count; j++)
|
||||
{
|
||||
smtpResponse = this.SendCommand("RCPT TO:<" + message.CC[j].Address + '>');
|
||||
if (this.IsError(smtpResponse))
|
||||
{
|
||||
list.Add(new SmtpFailedRecipientException(smtpResponse.StatusCode, message.CC[j].Address));
|
||||
}
|
||||
}
|
||||
for (int k = 0; k < message.Bcc.Count; k++)
|
||||
{
|
||||
smtpResponse = this.SendCommand("RCPT TO:<" + message.Bcc[k].Address + '>');
|
||||
if (this.IsError(smtpResponse))
|
||||
{
|
||||
list.Add(new SmtpFailedRecipientException(smtpResponse.StatusCode, message.Bcc[k].Address));
|
||||
}
|
||||
}
|
||||
if (list.Count > 0)
|
||||
{
|
||||
throw new SmtpFailedRecipientsException("failed recipients", list.ToArray());
|
||||
}
|
||||
smtpResponse = this.SendCommand("DATA");
|
||||
if (this.IsError(smtpResponse))
|
||||
{
|
||||
throw new SmtpException(smtpResponse.StatusCode, smtpResponse.Description);
|
||||
}
|
||||
string text = DateTime.Now.ToString("ddd, dd MMM yyyy HH':'mm':'ss zzz", DateTimeFormatInfo.InvariantInfo);
|
||||
text = text.Remove(text.Length - 3, 1);
|
||||
this.SendHeader("Date", text);
|
||||
this.SendHeader("From", SmtpClient.EncodeAddress(from));
|
||||
this.SendHeader("To", SmtpClient.EncodeAddresses(message.To));
|
||||
if (message.CC.Count > 0)
|
||||
{
|
||||
this.SendHeader("Cc", SmtpClient.EncodeAddresses(message.CC));
|
||||
}
|
||||
this.SendHeader("Subject", this.EncodeSubjectRFC2047(message));
|
||||
string text2 = "normal";
|
||||
switch (message.Priority)
|
||||
{
|
||||
case MailPriority.Normal:
|
||||
text2 = "normal";
|
||||
break;
|
||||
case MailPriority.Low:
|
||||
text2 = "non-urgent";
|
||||
break;
|
||||
case MailPriority.High:
|
||||
text2 = "urgent";
|
||||
break;
|
||||
}
|
||||
this.SendHeader("Priority", text2);
|
||||
if (message.Sender != null)
|
||||
{
|
||||
this.SendHeader("Sender", SmtpClient.EncodeAddress(message.Sender));
|
||||
}
|
||||
if (message.ReplyToList.Count > 0)
|
||||
{
|
||||
this.SendHeader("Reply-To", SmtpClient.EncodeAddresses(message.ReplyToList));
|
||||
}
|
||||
foreach (string text3 in message.Headers.AllKeys)
|
||||
{
|
||||
this.SendHeader(text3, message.Headers[text3]);
|
||||
}
|
||||
this.AddPriorityHeader(message);
|
||||
this.boundaryIndex = 0;
|
||||
if (message.Attachments.Count > 0)
|
||||
{
|
||||
this.SendWithAttachments(message);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.SendWithoutAttachments(message, null, false);
|
||||
}
|
||||
this.SendDot();
|
||||
smtpResponse = this.Read();
|
||||
if (this.IsError(smtpResponse))
|
||||
{
|
||||
throw new SmtpException(smtpResponse.StatusCode, smtpResponse.Description);
|
||||
}
|
||||
try
|
||||
{
|
||||
smtpResponse = this.SendCommand("QUIT");
|
||||
}
|
||||
catch (IOException)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Sends the specified e-mail message to an SMTP server for delivery. The message sender, recipients, subject, and message body are specified using <see cref="T:System.String" /> objects.</summary>
|
||||
/// <param name="from">A <see cref="T:System.String" /> that contains the address information of the message sender.</param>
|
||||
/// <param name="recipients">A <see cref="T:System.String" /> that contains the addresses that the message is sent to.</param>
|
||||
/// <param name="subject">A <see cref="T:System.String" /> that contains the subject line for the message.</param>
|
||||
/// <param name="body">A <see cref="T:System.String" /> that contains the message body.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="from" /> is null.-or-<paramref name="recipient" /> is null.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="from" /> is <see cref="F:System.String.Empty" />.-or-<paramref name="recipient" /> is <see cref="F:System.String.Empty" />.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">This <see cref="T:System.Net.Mail.SmtpClient" /> has a <see cref="Overload:System.Net.Mail.SmtpClient.SendAsync" /> call in progress.-or- <see cref="P:System.Net.Mail.SmtpClient.Host" /> is null.-or-<see cref="P:System.Net.Mail.SmtpClient.Host" /> is equal to the empty string ("").-or- <see cref="P:System.Net.Mail.SmtpClient.Port" /> is zero.</exception>
|
||||
/// <exception cref="T:System.ObjectDisposedException">This object has been disposed.</exception>
|
||||
/// <exception cref="T:System.Net.Mail.SmtpException">The connection to the SMTP server failed.-or-Authentication failed.-or-The operation timed out.</exception>
|
||||
/// <exception cref="T:System.Net.Mail.SmtpFailedRecipientsException">The message could not be delivered to one or more of the recipients in <paramref name="recipients" />. </exception>
|
||||
// Token: 0x06000B31 RID: 2865 RVA: 0x00021D84 File Offset: 0x0001FF84
|
||||
public void Send(string from, string to, string subject, string body)
|
||||
{
|
||||
this.Send(new MailMessage(from, to, subject, body));
|
||||
}
|
||||
|
||||
// Token: 0x06000B32 RID: 2866 RVA: 0x00021D98 File Offset: 0x0001FF98
|
||||
private void SendDot()
|
||||
{
|
||||
this.writer.Write(".\r\n");
|
||||
this.writer.Flush();
|
||||
}
|
||||
|
||||
// Token: 0x06000B33 RID: 2867 RVA: 0x00021DB8 File Offset: 0x0001FFB8
|
||||
private void SendData(string data)
|
||||
{
|
||||
if (string.IsNullOrEmpty(data))
|
||||
{
|
||||
this.writer.Write("\r\n");
|
||||
this.writer.Flush();
|
||||
return;
|
||||
}
|
||||
StringReader stringReader = new StringReader(data);
|
||||
bool flag = this.deliveryMethod == SmtpDeliveryMethod.Network;
|
||||
string text;
|
||||
while ((text = stringReader.ReadLine()) != null)
|
||||
{
|
||||
this.CheckCancellation();
|
||||
if (flag)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < text.Length; i++)
|
||||
{
|
||||
if (text[i] != '.')
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (i > 0 && i == text.Length)
|
||||
{
|
||||
text += ".";
|
||||
}
|
||||
}
|
||||
this.writer.Write(text);
|
||||
this.writer.Write("\r\n");
|
||||
}
|
||||
this.writer.Flush();
|
||||
}
|
||||
|
||||
/// <summary>Sends the specified e-mail message to an SMTP server for delivery. This method does not block the calling thread and allows the caller to pass an object to the method that is invoked when the operation completes. </summary>
|
||||
/// <param name="message">A <see cref="T:System.Net.Mail.MailMessage" /> that contains the message to send.</param>
|
||||
/// <param name="userToken">A user-defined object that is passed to the method invoked when the asynchronous operation completes.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <see cref="P:System.Net.Mail.MailMessage.From" /> is null.-or-<see cref="P:System.Net.Mail.MailMessage.To" /> is null.-or- <paramref name="message" /> is null.</exception>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">There are no recipients in <see cref="P:System.Net.Mail.MailMessage.To" />, <see cref="P:System.Net.Mail.MailMessage.CC" />, and <see cref="P:System.Net.Mail.MailMessage.Bcc" />.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">This <see cref="T:System.Net.Mail.SmtpClient" /> has a <see cref="Overload:System.Net.Mail.SmtpClient.SendAsync" /> call in progress.-or- <see cref="P:System.Net.Mail.SmtpClient.Host" /> is null.-or-<see cref="P:System.Net.Mail.SmtpClient.Host" /> is equal to the empty string ("").-or- <see cref="P:System.Net.Mail.SmtpClient.Port" /> is zero.</exception>
|
||||
/// <exception cref="T:System.ObjectDisposedException">This object has been disposed.</exception>
|
||||
/// <exception cref="T:System.Net.Mail.SmtpException">The connection to the SMTP server failed.-or-Authentication failed.-or-The operation timed out.</exception>
|
||||
/// <exception cref="T:System.Net.Mail.SmtpFailedRecipientsException">The <paramref name="message" /> could not be delivered to one or more of the recipients in <see cref="P:System.Net.Mail.MailMessage.To" />, <see cref="P:System.Net.Mail.MailMessage.CC" />, or <see cref="P:System.Net.Mail.MailMessage.Bcc" />.</exception>
|
||||
// Token: 0x06000B34 RID: 2868 RVA: 0x00021E8C File Offset: 0x0002008C
|
||||
public void SendAsync(MailMessage message, object userToken)
|
||||
{
|
||||
if (this.worker != null)
|
||||
{
|
||||
throw new InvalidOperationException("Another SendAsync operation is in progress");
|
||||
}
|
||||
this.worker = new global::System.ComponentModel.BackgroundWorker();
|
||||
this.worker.DoWork += delegate(object o, global::System.ComponentModel.DoWorkEventArgs ea)
|
||||
{
|
||||
try
|
||||
{
|
||||
this.user_async_state = ea.Argument;
|
||||
this.Send(message);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ea.Result = ex;
|
||||
throw ex;
|
||||
}
|
||||
};
|
||||
this.worker.WorkerSupportsCancellation = true;
|
||||
this.worker.RunWorkerCompleted += delegate(object o, global::System.ComponentModel.RunWorkerCompletedEventArgs ea)
|
||||
{
|
||||
this.OnSendCompleted(new global::System.ComponentModel.AsyncCompletedEventArgs(ea.Error, ea.Cancelled, this.user_async_state));
|
||||
};
|
||||
this.worker.RunWorkerAsync(userToken);
|
||||
}
|
||||
|
||||
/// <summary>Sends an e-mail message to an SMTP server for delivery. The message sender, recipients, subject, and message body are specified using <see cref="T:System.String" /> objects. This method does not block the calling thread and allows the caller to pass an object to the method that is invoked when the operation completes.</summary>
|
||||
/// <param name="from">A <see cref="T:System.String" /> that contains the address information of the message sender.</param>
|
||||
/// <param name="recipients">A <see cref="T:System.String" /> that contains the address that the message is sent to.</param>
|
||||
/// <param name="subject">A <see cref="T:System.String" /> that contains the subject line for the message.</param>
|
||||
/// <param name="body">A <see cref="T:System.String" /> that contains the message body.</param>
|
||||
/// <param name="userToken">A user-defined object that is passed to the method invoked when the asynchronous operation completes.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="from" /> is null.-or-<paramref name="recipient" /> is null.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="from" /> is <see cref="F:System.String.Empty" />.-or-<paramref name="recipient" /> is <see cref="F:System.String.Empty" />.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">This <see cref="T:System.Net.Mail.SmtpClient" /> has a <see cref="Overload:System.Net.Mail.SmtpClient.SendAsync" /> call in progress.-or- <see cref="P:System.Net.Mail.SmtpClient.Host" /> is null.-or-<see cref="P:System.Net.Mail.SmtpClient.Host" /> is equal to the empty string ("").-or- <see cref="P:System.Net.Mail.SmtpClient.Port" /> is zero.</exception>
|
||||
/// <exception cref="T:System.ObjectDisposedException">This object has been disposed.</exception>
|
||||
/// <exception cref="T:System.Net.Mail.SmtpException">The connection to the SMTP server failed.-or-Authentication failed.-or-The operation timed out.</exception>
|
||||
/// <exception cref="T:System.Net.Mail.SmtpFailedRecipientsException">The message could not be delivered to one or more of the recipients in <paramref name="recipients" />. </exception>
|
||||
// Token: 0x06000B35 RID: 2869 RVA: 0x00021F14 File Offset: 0x00020114
|
||||
public void SendAsync(string from, string to, string subject, string body, object userToken)
|
||||
{
|
||||
this.SendAsync(new MailMessage(from, to, subject, body), userToken);
|
||||
}
|
||||
|
||||
/// <summary>Cancels an asynchronous operation to send an e-mail message.</summary>
|
||||
/// <exception cref="T:System.ObjectDisposedException">This object has been disposed.</exception>
|
||||
// Token: 0x06000B36 RID: 2870 RVA: 0x00021F28 File Offset: 0x00020128
|
||||
public void SendAsyncCancel()
|
||||
{
|
||||
if (this.worker == null)
|
||||
{
|
||||
throw new InvalidOperationException("SendAsync operation is not in progress");
|
||||
}
|
||||
this.worker.CancelAsync();
|
||||
}
|
||||
|
||||
// Token: 0x06000B37 RID: 2871 RVA: 0x00021F4C File Offset: 0x0002014C
|
||||
private void AddPriorityHeader(MailMessage message)
|
||||
{
|
||||
MailPriority priority = message.Priority;
|
||||
if (priority != MailPriority.Low)
|
||||
{
|
||||
if (priority == MailPriority.High)
|
||||
{
|
||||
this.SendHeader("Priority", "Urgent");
|
||||
this.SendHeader("Importance", "high");
|
||||
this.SendHeader("X-Priority", "1");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.SendHeader("Priority", "Non-Urgent");
|
||||
this.SendHeader("Importance", "low");
|
||||
this.SendHeader("X-Priority", "5");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000B38 RID: 2872 RVA: 0x00021FE0 File Offset: 0x000201E0
|
||||
private void SendSimpleBody(MailMessage message)
|
||||
{
|
||||
this.SendHeader("Content-Type", message.BodyContentType.ToString());
|
||||
if (message.ContentTransferEncoding != global::System.Net.Mime.TransferEncoding.SevenBit)
|
||||
{
|
||||
this.SendHeader("Content-Transfer-Encoding", SmtpClient.GetTransferEncodingName(message.ContentTransferEncoding));
|
||||
}
|
||||
this.SendData(string.Empty);
|
||||
this.SendData(this.EncodeBody(message));
|
||||
}
|
||||
|
||||
// Token: 0x06000B39 RID: 2873 RVA: 0x00022040 File Offset: 0x00020240
|
||||
private void SendBodylessSingleAlternate(AlternateView av)
|
||||
{
|
||||
this.SendHeader("Content-Type", av.ContentType.ToString());
|
||||
if (av.TransferEncoding != global::System.Net.Mime.TransferEncoding.SevenBit)
|
||||
{
|
||||
this.SendHeader("Content-Transfer-Encoding", SmtpClient.GetTransferEncodingName(av.TransferEncoding));
|
||||
}
|
||||
this.SendData(string.Empty);
|
||||
this.SendData(this.EncodeBody(av));
|
||||
}
|
||||
|
||||
// Token: 0x06000B3A RID: 2874 RVA: 0x000220A0 File Offset: 0x000202A0
|
||||
private void SendWithoutAttachments(MailMessage message, string boundary, bool attachmentExists)
|
||||
{
|
||||
if (message.Body == null && message.AlternateViews.Count == 1)
|
||||
{
|
||||
this.SendBodylessSingleAlternate(message.AlternateViews[0]);
|
||||
}
|
||||
else if (message.AlternateViews.Count > 0)
|
||||
{
|
||||
this.SendBodyWithAlternateViews(message, boundary, attachmentExists);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.SendSimpleBody(message);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000B3B RID: 2875 RVA: 0x00022108 File Offset: 0x00020308
|
||||
private void SendWithAttachments(MailMessage message)
|
||||
{
|
||||
string text = this.GenerateBoundary();
|
||||
this.SendHeader("Content-Type", new global::System.Net.Mime.ContentType
|
||||
{
|
||||
Boundary = text,
|
||||
MediaType = "multipart/mixed",
|
||||
CharSet = null
|
||||
}.ToString());
|
||||
this.SendData(string.Empty);
|
||||
Attachment attachment = null;
|
||||
if (message.AlternateViews.Count > 0)
|
||||
{
|
||||
this.SendWithoutAttachments(message, text, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
attachment = Attachment.CreateAttachmentFromString(message.Body, null, message.BodyEncoding, (!message.IsBodyHtml) ? "text/plain" : "text/html");
|
||||
message.Attachments.Insert(0, attachment);
|
||||
}
|
||||
try
|
||||
{
|
||||
this.SendAttachments(message, attachment, text);
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (attachment != null)
|
||||
{
|
||||
message.Attachments.Remove(attachment);
|
||||
}
|
||||
}
|
||||
this.EndSection(text);
|
||||
}
|
||||
|
||||
// Token: 0x06000B3C RID: 2876 RVA: 0x000221F8 File Offset: 0x000203F8
|
||||
private void SendBodyWithAlternateViews(MailMessage message, string boundary, bool attachmentExists)
|
||||
{
|
||||
AlternateViewCollection alternateViews = message.AlternateViews;
|
||||
string text = this.GenerateBoundary();
|
||||
global::System.Net.Mime.ContentType contentType = new global::System.Net.Mime.ContentType();
|
||||
contentType.Boundary = text;
|
||||
contentType.MediaType = "multipart/alternative";
|
||||
if (!attachmentExists)
|
||||
{
|
||||
this.SendHeader("Content-Type", contentType.ToString());
|
||||
this.SendData(string.Empty);
|
||||
}
|
||||
AlternateView alternateView = null;
|
||||
if (message.Body != null)
|
||||
{
|
||||
alternateView = AlternateView.CreateAlternateViewFromString(message.Body, message.BodyEncoding, (!message.IsBodyHtml) ? "text/plain" : "text/html");
|
||||
alternateViews.Insert(0, alternateView);
|
||||
this.StartSection(boundary, contentType);
|
||||
}
|
||||
try
|
||||
{
|
||||
foreach (AlternateView alternateView2 in alternateViews)
|
||||
{
|
||||
string text2 = null;
|
||||
if (alternateView2.LinkedResources.Count > 0)
|
||||
{
|
||||
text2 = this.GenerateBoundary();
|
||||
global::System.Net.Mime.ContentType contentType2 = new global::System.Net.Mime.ContentType("multipart/related");
|
||||
contentType2.Boundary = text2;
|
||||
contentType2.Parameters["type"] = alternateView2.ContentType.ToString();
|
||||
this.StartSection(text, contentType2);
|
||||
this.StartSection(text2, alternateView2.ContentType, alternateView2.TransferEncoding);
|
||||
}
|
||||
else
|
||||
{
|
||||
global::System.Net.Mime.ContentType contentType2 = new global::System.Net.Mime.ContentType(alternateView2.ContentType.ToString());
|
||||
this.StartSection(text, contentType2, alternateView2.TransferEncoding);
|
||||
}
|
||||
global::System.Net.Mime.TransferEncoding transferEncoding = alternateView2.TransferEncoding;
|
||||
switch (transferEncoding + 1)
|
||||
{
|
||||
case global::System.Net.Mime.TransferEncoding.QuotedPrintable:
|
||||
case (global::System.Net.Mime.TransferEncoding)3:
|
||||
{
|
||||
byte[] array = new byte[alternateView2.ContentStream.Length];
|
||||
alternateView2.ContentStream.Read(array, 0, array.Length);
|
||||
this.SendData(Encoding.ASCII.GetString(array));
|
||||
break;
|
||||
}
|
||||
case global::System.Net.Mime.TransferEncoding.Base64:
|
||||
{
|
||||
byte[] array2 = new byte[alternateView2.ContentStream.Length];
|
||||
alternateView2.ContentStream.Read(array2, 0, array2.Length);
|
||||
this.SendData(this.ToQuotedPrintable(array2));
|
||||
break;
|
||||
}
|
||||
case global::System.Net.Mime.TransferEncoding.SevenBit:
|
||||
{
|
||||
byte[] array = new byte[alternateView2.ContentStream.Length];
|
||||
alternateView2.ContentStream.Read(array, 0, array.Length);
|
||||
this.SendData(Convert.ToBase64String(array, Base64FormattingOptions.InsertLineBreaks));
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (alternateView2.LinkedResources.Count > 0)
|
||||
{
|
||||
this.SendLinkedResources(message, alternateView2.LinkedResources, text2);
|
||||
this.EndSection(text2);
|
||||
}
|
||||
if (!attachmentExists)
|
||||
{
|
||||
this.SendData(string.Empty);
|
||||
}
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (alternateView != null)
|
||||
{
|
||||
alternateViews.Remove(alternateView);
|
||||
}
|
||||
}
|
||||
this.EndSection(text);
|
||||
}
|
||||
|
||||
// Token: 0x06000B3D RID: 2877 RVA: 0x000224C8 File Offset: 0x000206C8
|
||||
private void SendLinkedResources(MailMessage message, LinkedResourceCollection resources, string boundary)
|
||||
{
|
||||
foreach (LinkedResource linkedResource in resources)
|
||||
{
|
||||
this.StartSection(boundary, linkedResource.ContentType, linkedResource.TransferEncoding, linkedResource);
|
||||
global::System.Net.Mime.TransferEncoding transferEncoding = linkedResource.TransferEncoding;
|
||||
switch (transferEncoding + 1)
|
||||
{
|
||||
case global::System.Net.Mime.TransferEncoding.QuotedPrintable:
|
||||
case (global::System.Net.Mime.TransferEncoding)3:
|
||||
{
|
||||
byte[] array = new byte[linkedResource.ContentStream.Length];
|
||||
linkedResource.ContentStream.Read(array, 0, array.Length);
|
||||
this.SendData(Encoding.ASCII.GetString(array));
|
||||
break;
|
||||
}
|
||||
case global::System.Net.Mime.TransferEncoding.Base64:
|
||||
{
|
||||
byte[] array2 = new byte[linkedResource.ContentStream.Length];
|
||||
linkedResource.ContentStream.Read(array2, 0, array2.Length);
|
||||
this.SendData(this.ToQuotedPrintable(array2));
|
||||
break;
|
||||
}
|
||||
case global::System.Net.Mime.TransferEncoding.SevenBit:
|
||||
{
|
||||
byte[] array = new byte[linkedResource.ContentStream.Length];
|
||||
linkedResource.ContentStream.Read(array, 0, array.Length);
|
||||
this.SendData(Convert.ToBase64String(array, Base64FormattingOptions.InsertLineBreaks));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000B3E RID: 2878 RVA: 0x000225FC File Offset: 0x000207FC
|
||||
private void SendAttachments(MailMessage message, Attachment body, string boundary)
|
||||
{
|
||||
foreach (Attachment attachment in message.Attachments)
|
||||
{
|
||||
global::System.Net.Mime.ContentType contentType = new global::System.Net.Mime.ContentType(attachment.ContentType.ToString());
|
||||
if (attachment.Name != null)
|
||||
{
|
||||
contentType.Name = attachment.Name;
|
||||
if (attachment.NameEncoding != null)
|
||||
{
|
||||
contentType.CharSet = attachment.NameEncoding.HeaderName;
|
||||
}
|
||||
attachment.ContentDisposition.FileName = attachment.Name;
|
||||
}
|
||||
this.StartSection(boundary, contentType, attachment.TransferEncoding, (attachment != body) ? attachment.ContentDisposition : null);
|
||||
byte[] array = new byte[attachment.ContentStream.Length];
|
||||
attachment.ContentStream.Read(array, 0, array.Length);
|
||||
global::System.Net.Mime.TransferEncoding transferEncoding = attachment.TransferEncoding;
|
||||
switch (transferEncoding + 1)
|
||||
{
|
||||
case global::System.Net.Mime.TransferEncoding.QuotedPrintable:
|
||||
case (global::System.Net.Mime.TransferEncoding)3:
|
||||
this.SendData(Encoding.ASCII.GetString(array));
|
||||
break;
|
||||
case global::System.Net.Mime.TransferEncoding.Base64:
|
||||
this.SendData(this.ToQuotedPrintable(array));
|
||||
break;
|
||||
case global::System.Net.Mime.TransferEncoding.SevenBit:
|
||||
this.SendData(Convert.ToBase64String(array, Base64FormattingOptions.InsertLineBreaks));
|
||||
break;
|
||||
}
|
||||
this.SendData(string.Empty);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000B3F RID: 2879 RVA: 0x0002275C File Offset: 0x0002095C
|
||||
private SmtpClient.SmtpResponse SendCommand(string command)
|
||||
{
|
||||
this.writer.Write(command);
|
||||
this.writer.Write("\r\n");
|
||||
this.writer.Flush();
|
||||
return this.Read();
|
||||
}
|
||||
|
||||
// Token: 0x06000B40 RID: 2880 RVA: 0x00022798 File Offset: 0x00020998
|
||||
private void SendHeader(string name, string value)
|
||||
{
|
||||
this.SendData(string.Format("{0}: {1}", name, value));
|
||||
}
|
||||
|
||||
// Token: 0x06000B41 RID: 2881 RVA: 0x000227AC File Offset: 0x000209AC
|
||||
private void StartSection(string section, global::System.Net.Mime.ContentType sectionContentType)
|
||||
{
|
||||
this.SendData(string.Format("--{0}", section));
|
||||
this.SendHeader("content-type", sectionContentType.ToString());
|
||||
this.SendData(string.Empty);
|
||||
}
|
||||
|
||||
// Token: 0x06000B42 RID: 2882 RVA: 0x000227E8 File Offset: 0x000209E8
|
||||
private void StartSection(string section, global::System.Net.Mime.ContentType sectionContentType, global::System.Net.Mime.TransferEncoding transferEncoding)
|
||||
{
|
||||
this.SendData(string.Format("--{0}", section));
|
||||
this.SendHeader("content-type", sectionContentType.ToString());
|
||||
this.SendHeader("content-transfer-encoding", SmtpClient.GetTransferEncodingName(transferEncoding));
|
||||
this.SendData(string.Empty);
|
||||
}
|
||||
|
||||
// Token: 0x06000B43 RID: 2883 RVA: 0x00022834 File Offset: 0x00020A34
|
||||
private void StartSection(string section, global::System.Net.Mime.ContentType sectionContentType, global::System.Net.Mime.TransferEncoding transferEncoding, LinkedResource lr)
|
||||
{
|
||||
this.SendData(string.Format("--{0}", section));
|
||||
this.SendHeader("content-type", sectionContentType.ToString());
|
||||
this.SendHeader("content-transfer-encoding", SmtpClient.GetTransferEncodingName(transferEncoding));
|
||||
if (lr.ContentId != null && lr.ContentId.Length > 0)
|
||||
{
|
||||
this.SendHeader("content-ID", "<" + lr.ContentId + ">");
|
||||
}
|
||||
this.SendData(string.Empty);
|
||||
}
|
||||
|
||||
// Token: 0x06000B44 RID: 2884 RVA: 0x000228C0 File Offset: 0x00020AC0
|
||||
private void StartSection(string section, global::System.Net.Mime.ContentType sectionContentType, global::System.Net.Mime.TransferEncoding transferEncoding, global::System.Net.Mime.ContentDisposition contentDisposition)
|
||||
{
|
||||
this.SendData(string.Format("--{0}", section));
|
||||
this.SendHeader("content-type", sectionContentType.ToString());
|
||||
this.SendHeader("content-transfer-encoding", SmtpClient.GetTransferEncodingName(transferEncoding));
|
||||
if (contentDisposition != null)
|
||||
{
|
||||
this.SendHeader("content-disposition", contentDisposition.ToString());
|
||||
}
|
||||
this.SendData(string.Empty);
|
||||
}
|
||||
|
||||
// Token: 0x06000B45 RID: 2885 RVA: 0x00022924 File Offset: 0x00020B24
|
||||
private string ToQuotedPrintable(string input, Encoding enc)
|
||||
{
|
||||
byte[] bytes = enc.GetBytes(input);
|
||||
return this.ToQuotedPrintable(bytes);
|
||||
}
|
||||
|
||||
// Token: 0x06000B46 RID: 2886 RVA: 0x00022940 File Offset: 0x00020B40
|
||||
private string ToQuotedPrintable(byte[] bytes)
|
||||
{
|
||||
StringWriter stringWriter = new StringWriter();
|
||||
int num = 0;
|
||||
StringBuilder stringBuilder = new StringBuilder("=", 3);
|
||||
byte b = 61;
|
||||
char c = '\0';
|
||||
int i = 0;
|
||||
while (i < bytes.Length)
|
||||
{
|
||||
byte b2 = bytes[i];
|
||||
int num2;
|
||||
if (b2 > 127 || b2 == b)
|
||||
{
|
||||
stringBuilder.Length = 1;
|
||||
stringBuilder.Append(Convert.ToString(b2, 16).ToUpperInvariant());
|
||||
num2 = 3;
|
||||
goto IL_8E;
|
||||
}
|
||||
c = Convert.ToChar(b2);
|
||||
if (c != '\r' && c != '\n')
|
||||
{
|
||||
num2 = 1;
|
||||
goto IL_8E;
|
||||
}
|
||||
stringWriter.Write(c);
|
||||
num = 0;
|
||||
IL_C7:
|
||||
i++;
|
||||
continue;
|
||||
IL_8E:
|
||||
num += num2;
|
||||
if (num > 75)
|
||||
{
|
||||
stringWriter.Write("=\r\n");
|
||||
num = num2;
|
||||
}
|
||||
if (num2 == 1)
|
||||
{
|
||||
stringWriter.Write(c);
|
||||
goto IL_C7;
|
||||
}
|
||||
stringWriter.Write(stringBuilder.ToString());
|
||||
goto IL_C7;
|
||||
}
|
||||
return stringWriter.ToString();
|
||||
}
|
||||
|
||||
// Token: 0x06000B47 RID: 2887 RVA: 0x00022A2C File Offset: 0x00020C2C
|
||||
private static string GetTransferEncodingName(global::System.Net.Mime.TransferEncoding encoding)
|
||||
{
|
||||
switch (encoding)
|
||||
{
|
||||
case global::System.Net.Mime.TransferEncoding.QuotedPrintable:
|
||||
return "quoted-printable";
|
||||
case global::System.Net.Mime.TransferEncoding.Base64:
|
||||
return "base64";
|
||||
case global::System.Net.Mime.TransferEncoding.SevenBit:
|
||||
return "7bit";
|
||||
default:
|
||||
return "unknown";
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000B48 RID: 2888 RVA: 0x00022A6C File Offset: 0x00020C6C
|
||||
private void InitiateSecureConnection()
|
||||
{
|
||||
SmtpClient.SmtpResponse smtpResponse = this.SendCommand("STARTTLS");
|
||||
if (this.IsError(smtpResponse))
|
||||
{
|
||||
throw new SmtpException(SmtpStatusCode.GeneralFailure, "Server does not support secure connections.");
|
||||
}
|
||||
global::System.Net.Security.SslStream sslStream = new global::System.Net.Security.SslStream(this.stream, false, this.callback, null);
|
||||
this.CheckCancellation();
|
||||
sslStream.AuthenticateAsClient(this.Host, this.ClientCertificates, global::System.Security.Authentication.SslProtocols.Default, false);
|
||||
this.stream = sslStream;
|
||||
}
|
||||
|
||||
// Token: 0x06000B49 RID: 2889 RVA: 0x00022AD8 File Offset: 0x00020CD8
|
||||
private void Authenticate()
|
||||
{
|
||||
string text;
|
||||
string text2;
|
||||
if (this.UseDefaultCredentials)
|
||||
{
|
||||
text = CredentialCache.DefaultCredentials.GetCredential(new global::System.Uri("smtp://" + this.host), "basic").UserName;
|
||||
text2 = CredentialCache.DefaultCredentials.GetCredential(new global::System.Uri("smtp://" + this.host), "basic").Password;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (this.Credentials == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
text = this.Credentials.GetCredential(this.host, this.port, "smtp").UserName;
|
||||
text2 = this.Credentials.GetCredential(this.host, this.port, "smtp").Password;
|
||||
}
|
||||
this.Authenticate(text, text2);
|
||||
}
|
||||
|
||||
// Token: 0x06000B4A RID: 2890 RVA: 0x00022BAC File Offset: 0x00020DAC
|
||||
private void Authenticate(string Username, string Password)
|
||||
{
|
||||
SmtpClient.SmtpResponse smtpResponse = this.SendCommand("AUTH LOGIN");
|
||||
if (smtpResponse.StatusCode != (SmtpStatusCode)334)
|
||||
{
|
||||
throw new SmtpException(smtpResponse.StatusCode, smtpResponse.Description);
|
||||
}
|
||||
smtpResponse = this.SendCommand(Convert.ToBase64String(Encoding.ASCII.GetBytes(Username)));
|
||||
if (smtpResponse.StatusCode != (SmtpStatusCode)334)
|
||||
{
|
||||
throw new SmtpException(smtpResponse.StatusCode, smtpResponse.Description);
|
||||
}
|
||||
smtpResponse = this.SendCommand(Convert.ToBase64String(Encoding.ASCII.GetBytes(Password)));
|
||||
if (this.IsError(smtpResponse))
|
||||
{
|
||||
throw new SmtpException(smtpResponse.StatusCode, smtpResponse.Description);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000B22 RID: 2850
|
||||
private string host;
|
||||
|
||||
// Token: 0x04000B23 RID: 2851
|
||||
private int port;
|
||||
|
||||
// Token: 0x04000B24 RID: 2852
|
||||
private int timeout = 100000;
|
||||
|
||||
// Token: 0x04000B25 RID: 2853
|
||||
private ICredentialsByHost credentials;
|
||||
|
||||
// Token: 0x04000B26 RID: 2854
|
||||
private string pickupDirectoryLocation;
|
||||
|
||||
// Token: 0x04000B27 RID: 2855
|
||||
private SmtpDeliveryMethod deliveryMethod;
|
||||
|
||||
// Token: 0x04000B28 RID: 2856
|
||||
private bool enableSsl;
|
||||
|
||||
// Token: 0x04000B29 RID: 2857
|
||||
private global::System.Security.Cryptography.X509Certificates.X509CertificateCollection clientCertificates;
|
||||
|
||||
// Token: 0x04000B2A RID: 2858
|
||||
private global::System.Net.Sockets.TcpClient client;
|
||||
|
||||
// Token: 0x04000B2B RID: 2859
|
||||
private Stream stream;
|
||||
|
||||
// Token: 0x04000B2C RID: 2860
|
||||
private StreamWriter writer;
|
||||
|
||||
// Token: 0x04000B2D RID: 2861
|
||||
private StreamReader reader;
|
||||
|
||||
// Token: 0x04000B2E RID: 2862
|
||||
private int boundaryIndex;
|
||||
|
||||
// Token: 0x04000B2F RID: 2863
|
||||
private MailAddress defaultFrom;
|
||||
|
||||
// Token: 0x04000B30 RID: 2864
|
||||
private MailMessage messageInProcess;
|
||||
|
||||
// Token: 0x04000B31 RID: 2865
|
||||
private global::System.ComponentModel.BackgroundWorker worker;
|
||||
|
||||
// Token: 0x04000B32 RID: 2866
|
||||
private object user_async_state;
|
||||
|
||||
// Token: 0x04000B33 RID: 2867
|
||||
private SmtpClient.AuthMechs authMechs;
|
||||
|
||||
// Token: 0x04000B34 RID: 2868
|
||||
private Mutex mutex = new Mutex();
|
||||
|
||||
// Token: 0x04000B35 RID: 2869
|
||||
private global::System.Net.Security.RemoteCertificateValidationCallback callback = delegate(object sender, X509Certificate certificate, global::System.Security.Cryptography.X509Certificates.X509Chain chain, global::System.Net.Security.SslPolicyErrors sslPolicyErrors)
|
||||
{
|
||||
if (ServicePointManager.ServerCertificateValidationCallback != null)
|
||||
{
|
||||
return ServicePointManager.ServerCertificateValidationCallback(sender, certificate, chain, sslPolicyErrors);
|
||||
}
|
||||
if (sslPolicyErrors != global::System.Net.Security.SslPolicyErrors.None)
|
||||
{
|
||||
throw new InvalidOperationException("SSL authentication error: " + sslPolicyErrors);
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
// Token: 0x02000144 RID: 324
|
||||
[Flags]
|
||||
private enum AuthMechs
|
||||
{
|
||||
// Token: 0x04000B3B RID: 2875
|
||||
None = 0,
|
||||
// Token: 0x04000B3C RID: 2876
|
||||
CramMD5 = 1,
|
||||
// Token: 0x04000B3D RID: 2877
|
||||
DigestMD5 = 2,
|
||||
// Token: 0x04000B3E RID: 2878
|
||||
GssAPI = 4,
|
||||
// Token: 0x04000B3F RID: 2879
|
||||
Kerberos4 = 8,
|
||||
// Token: 0x04000B40 RID: 2880
|
||||
Login = 16,
|
||||
// Token: 0x04000B41 RID: 2881
|
||||
Plain = 32
|
||||
}
|
||||
|
||||
// Token: 0x02000145 RID: 325
|
||||
private class CancellationException : Exception
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x02000146 RID: 326
|
||||
private struct HeaderName
|
||||
{
|
||||
// Token: 0x04000B42 RID: 2882
|
||||
public const string ContentTransferEncoding = "Content-Transfer-Encoding";
|
||||
|
||||
// Token: 0x04000B43 RID: 2883
|
||||
public const string ContentType = "Content-Type";
|
||||
|
||||
// Token: 0x04000B44 RID: 2884
|
||||
public const string Bcc = "Bcc";
|
||||
|
||||
// Token: 0x04000B45 RID: 2885
|
||||
public const string Cc = "Cc";
|
||||
|
||||
// Token: 0x04000B46 RID: 2886
|
||||
public const string From = "From";
|
||||
|
||||
// Token: 0x04000B47 RID: 2887
|
||||
public const string Subject = "Subject";
|
||||
|
||||
// Token: 0x04000B48 RID: 2888
|
||||
public const string To = "To";
|
||||
|
||||
// Token: 0x04000B49 RID: 2889
|
||||
public const string MimeVersion = "MIME-Version";
|
||||
|
||||
// Token: 0x04000B4A RID: 2890
|
||||
public const string MessageId = "Message-ID";
|
||||
|
||||
// Token: 0x04000B4B RID: 2891
|
||||
public const string Priority = "Priority";
|
||||
|
||||
// Token: 0x04000B4C RID: 2892
|
||||
public const string Importance = "Importance";
|
||||
|
||||
// Token: 0x04000B4D RID: 2893
|
||||
public const string XPriority = "X-Priority";
|
||||
|
||||
// Token: 0x04000B4E RID: 2894
|
||||
public const string Date = "Date";
|
||||
}
|
||||
|
||||
// Token: 0x02000147 RID: 327
|
||||
private struct SmtpResponse
|
||||
{
|
||||
// Token: 0x06000B4D RID: 2893 RVA: 0x00022CAC File Offset: 0x00020EAC
|
||||
public static SmtpClient.SmtpResponse Parse(string line)
|
||||
{
|
||||
SmtpClient.SmtpResponse smtpResponse = default(SmtpClient.SmtpResponse);
|
||||
if (line.Length < 4)
|
||||
{
|
||||
throw new SmtpException("Response is to short " + line.Length + ".");
|
||||
}
|
||||
if (line[3] != ' ' && line[3] != '-')
|
||||
{
|
||||
throw new SmtpException("Response format is wrong.(" + line + ")");
|
||||
}
|
||||
smtpResponse.StatusCode = (SmtpStatusCode)int.Parse(line.Substring(0, 3));
|
||||
smtpResponse.Description = line;
|
||||
return smtpResponse;
|
||||
}
|
||||
|
||||
// Token: 0x04000B4F RID: 2895
|
||||
public SmtpStatusCode StatusCode;
|
||||
|
||||
// Token: 0x04000B50 RID: 2896
|
||||
public string Description;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.Mail
|
||||
{
|
||||
/// <summary>Specifies how email messages are delivered.</summary>
|
||||
// Token: 0x02000149 RID: 329
|
||||
public enum SmtpDeliveryMethod
|
||||
{
|
||||
/// <summary>Email is sent through the network to an SMTP server.</summary>
|
||||
// Token: 0x04000B54 RID: 2900
|
||||
Network,
|
||||
/// <summary>Email is copied to the directory specified by the <see cref="P:System.Net.Mail.SmtpClient.PickupDirectoryLocation" /> property for delivery by an external application.</summary>
|
||||
// Token: 0x04000B55 RID: 2901
|
||||
SpecifiedPickupDirectory,
|
||||
/// <summary>Email is copied to the pickup directory used by a local Internet Information Services (IIS) for delivery.</summary>
|
||||
// Token: 0x04000B56 RID: 2902
|
||||
PickupDirectoryFromIis
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace System.Net.Mail
|
||||
{
|
||||
/// <summary>Represents the exception that is thrown when the <see cref="T:System.Net.Mail.SmtpClient" /> is not able to complete a <see cref="Overload:System.Net.Mail.SmtpClient.Send" /> or <see cref="Overload:System.Net.Mail.SmtpClient.SendAsync" /> operation.</summary>
|
||||
// Token: 0x0200014A RID: 330
|
||||
[Serializable]
|
||||
public class SmtpException : Exception, ISerializable
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Net.Mail.SmtpException" /> class. </summary>
|
||||
// Token: 0x06000B50 RID: 2896 RVA: 0x00022D68 File Offset: 0x00020F68
|
||||
public SmtpException()
|
||||
: this(SmtpStatusCode.GeneralFailure)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Net.Mail.SmtpException" /> class with the specified status code.</summary>
|
||||
/// <param name="statusCode">An <see cref="T:System.Net.Mail.SmtpStatusCode" /> value.</param>
|
||||
// Token: 0x06000B51 RID: 2897 RVA: 0x00022D74 File Offset: 0x00020F74
|
||||
public SmtpException(SmtpStatusCode statusCode)
|
||||
: this(statusCode, "Syntax error, command unrecognized.")
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Net.Mail.SmtpException" /> class with the specified error message.</summary>
|
||||
/// <param name="message">A <see cref="T:System.String" /> that describes the error that occurred.</param>
|
||||
// Token: 0x06000B52 RID: 2898 RVA: 0x00022D84 File Offset: 0x00020F84
|
||||
public SmtpException(string message)
|
||||
: this(SmtpStatusCode.GeneralFailure, message)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Net.Mail.SmtpException" /> class from the specified instances of the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> and <see cref="T:System.Runtime.Serialization.StreamingContext" /> classes. </summary>
|
||||
/// <param name="serializationInfo">A <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that contains the information required to serialize the new <see cref="T:System.Net.Mail.SmtpException" />. </param>
|
||||
/// <param name="streamingContext">A <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains the source and destination of the serialized stream associated with the new instance. </param>
|
||||
// Token: 0x06000B53 RID: 2899 RVA: 0x00022D90 File Offset: 0x00020F90
|
||||
protected SmtpException(SerializationInfo info, StreamingContext context)
|
||||
: base(info, context)
|
||||
{
|
||||
try
|
||||
{
|
||||
this.statusCode = (SmtpStatusCode)((int)info.GetValue("Status", typeof(int)));
|
||||
}
|
||||
catch (SerializationException)
|
||||
{
|
||||
this.statusCode = (SmtpStatusCode)((int)info.GetValue("statusCode", typeof(SmtpStatusCode)));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Net.Mail.SmtpException" /> class with the specified status code and error message.</summary>
|
||||
/// <param name="statusCode">An <see cref="T:System.Net.Mail.SmtpStatusCode" /> value.</param>
|
||||
/// <param name="message">A <see cref="T:System.String" /> that describes the error that occurred.</param>
|
||||
// Token: 0x06000B54 RID: 2900 RVA: 0x00022E0C File Offset: 0x0002100C
|
||||
public SmtpException(SmtpStatusCode statusCode, string message)
|
||||
: base(message)
|
||||
{
|
||||
this.statusCode = statusCode;
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Net.Mail.SmtpException" /> class with the specified error message and inner exception.</summary>
|
||||
/// <param name="message">A <see cref="T:System.String" /> that describes the error that occurred.</param>
|
||||
/// <param name="innerException">The exception that is the cause of the current exception. </param>
|
||||
// Token: 0x06000B55 RID: 2901 RVA: 0x00022E1C File Offset: 0x0002101C
|
||||
public SmtpException(string message, Exception innerException)
|
||||
: base(message, innerException)
|
||||
{
|
||||
this.statusCode = SmtpStatusCode.GeneralFailure;
|
||||
}
|
||||
|
||||
/// <summary>Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo" /> instance with the data needed to serialize the <see cref="T:System.Net.Mail.SmtpException" />.</summary>
|
||||
/// <param name="serializationInfo">A <see cref="T:System.Runtime.Serialization.SerializationInfo" />, which holds the serialized data for the <see cref="T:System.Net.Mail.SmtpException" />. </param>
|
||||
/// <param name="streamingContext">A <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains the destination of the serialized stream associated with the new <see cref="T:System.Net.Mail.SmtpException" />. </param>
|
||||
// Token: 0x06000B56 RID: 2902 RVA: 0x00022E30 File Offset: 0x00021030
|
||||
void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
this.GetObjectData(info, context);
|
||||
}
|
||||
|
||||
/// <summary>Gets the status code returned by an SMTP server when an e-mail message is transmitted.</summary>
|
||||
/// <returns>An <see cref="T:System.Net.Mail.SmtpStatusCode" /> value that indicates the error that occurred.</returns>
|
||||
// Token: 0x170002D8 RID: 728
|
||||
// (get) Token: 0x06000B57 RID: 2903 RVA: 0x00022E3C File Offset: 0x0002103C
|
||||
// (set) Token: 0x06000B58 RID: 2904 RVA: 0x00022E44 File Offset: 0x00021044
|
||||
public SmtpStatusCode StatusCode
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.statusCode;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.statusCode = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo" /> instance with the data needed to serialize the <see cref="T:System.Net.Mail.SmtpException" />.</summary>
|
||||
/// <param name="serializationInfo">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> to populate with data. </param>
|
||||
/// <param name="streamingContext">A <see cref="T:System.Runtime.Serialization.StreamingContext" /> that specifies the destination for this serialization.</param>
|
||||
// Token: 0x06000B59 RID: 2905 RVA: 0x00022E50 File Offset: 0x00021050
|
||||
public override void GetObjectData(SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
if (info == null)
|
||||
{
|
||||
throw new ArgumentNullException("info");
|
||||
}
|
||||
base.GetObjectData(info, context);
|
||||
info.AddValue("Status", this.statusCode, typeof(int));
|
||||
}
|
||||
|
||||
// Token: 0x04000B57 RID: 2903
|
||||
private SmtpStatusCode statusCode;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,118 @@
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace System.Net.Mail
|
||||
{
|
||||
/// <summary>Represents the exception that is thrown when the <see cref="T:System.Net.Mail.SmtpClient" /> is not able to complete a <see cref="Overload:System.Net.Mail.SmtpClient.Send" /> or <see cref="Overload:System.Net.Mail.SmtpClient.SendAsync" /> operation to a particular recipient.</summary>
|
||||
// Token: 0x0200014B RID: 331
|
||||
[Serializable]
|
||||
public class SmtpFailedRecipientException : SmtpException, ISerializable
|
||||
{
|
||||
/// <summary>Initializes an empty instance of the <see cref="T:System.Net.Mail.SmtpFailedRecipientException" /> class.</summary>
|
||||
// Token: 0x06000B5A RID: 2906 RVA: 0x00022E8C File Offset: 0x0002108C
|
||||
public SmtpFailedRecipientException()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Net.Mail.SmtpFailedRecipientException" /> class with the specified error message.</summary>
|
||||
/// <param name="message">A <see cref="T:System.String" /> that contains the error message.</param>
|
||||
// Token: 0x06000B5B RID: 2907 RVA: 0x00022E94 File Offset: 0x00021094
|
||||
public SmtpFailedRecipientException(string message)
|
||||
: base(message)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Net.Mail.SmtpFailedRecipientException" /> class from the specified instances of the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> and <see cref="T:System.Runtime.Serialization.StreamingContext" /> classes.</summary>
|
||||
/// <param name="info">A <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that contains the information required to serialize the new <see cref="T:System.Net.Mail.SmtpFailedRecipientException" />. </param>
|
||||
/// <param name="context">A <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains the source and destination of the serialized stream that is associated with the new instance. </param>
|
||||
// Token: 0x06000B5C RID: 2908 RVA: 0x00022EA0 File Offset: 0x000210A0
|
||||
protected SmtpFailedRecipientException(SerializationInfo serializationInfo, StreamingContext streamingContext)
|
||||
: base(serializationInfo, streamingContext)
|
||||
{
|
||||
if (serializationInfo == null)
|
||||
{
|
||||
throw new ArgumentNullException("serializationInfo");
|
||||
}
|
||||
this.failedRecipient = serializationInfo.GetString("failedRecipient");
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Net.Mail.SmtpFailedRecipientException" /> class with the specified status code and e-mail address.</summary>
|
||||
/// <param name="statusCode">An <see cref="T:System.Net.Mail.SmtpStatusCode" /> value.</param>
|
||||
/// <param name="failedRecipient">A <see cref="T:System.String" /> that contains the e-mail address.</param>
|
||||
// Token: 0x06000B5D RID: 2909 RVA: 0x00022ED8 File Offset: 0x000210D8
|
||||
public SmtpFailedRecipientException(SmtpStatusCode statusCode, string failedRecipient)
|
||||
: base(statusCode)
|
||||
{
|
||||
this.failedRecipient = failedRecipient;
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Net.Mail.SmtpException" /> class with the specified error message and inner exception.</summary>
|
||||
/// <param name="message">A <see cref="T:System.String" /> that describes the error that occurred.</param>
|
||||
/// <param name="innerException">The exception that is the cause of the current exception. </param>
|
||||
// Token: 0x06000B5E RID: 2910 RVA: 0x00022EE8 File Offset: 0x000210E8
|
||||
public SmtpFailedRecipientException(string message, Exception innerException)
|
||||
: base(message, innerException)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Net.Mail.SmtpException" /> class with the specified error message, e-mail address, and inner exception.</summary>
|
||||
/// <param name="message">A <see cref="T:System.String" /> that describes the error that occurred.</param>
|
||||
/// <param name="failedRecipient">A <see cref="T:System.String" /> that contains the e-mail address.</param>
|
||||
/// <param name="innerException">The exception that is the cause of the current exception.</param>
|
||||
// Token: 0x06000B5F RID: 2911 RVA: 0x00022EF4 File Offset: 0x000210F4
|
||||
public SmtpFailedRecipientException(string message, string failedRecipient, Exception innerException)
|
||||
: base(message, innerException)
|
||||
{
|
||||
this.failedRecipient = failedRecipient;
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Net.Mail.SmtpFailedRecipientException" /> class with the specified status code, e-mail address, and server response.</summary>
|
||||
/// <param name="statusCode">An <see cref="T:System.Net.Mail.SmtpStatusCode" /> value.</param>
|
||||
/// <param name="failedRecipient">A <see cref="T:System.String" /> that contains the e-mail address.</param>
|
||||
/// <param name="serverResponse">A <see cref="T:System.String" /> that contains the server response.</param>
|
||||
// Token: 0x06000B60 RID: 2912 RVA: 0x00022F08 File Offset: 0x00021108
|
||||
public SmtpFailedRecipientException(SmtpStatusCode statusCode, string failedRecipient, string serverResponse)
|
||||
: base(statusCode, serverResponse)
|
||||
{
|
||||
this.failedRecipient = failedRecipient;
|
||||
}
|
||||
|
||||
/// <summary>Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo" /> instance with the data that is needed to serialize the <see cref="T:System.Net.Mail.SmtpFailedRecipientException" />.</summary>
|
||||
/// <param name="serializationInfo">A <see cref="T:System.Runtime.Serialization.SerializationInfo" /> instance, which holds the serialized data for the <see cref="T:System.Net.Mail.SmtpFailedRecipientException" />. </param>
|
||||
/// <param name="streamingContext">A <see cref="T:System.Runtime.Serialization.StreamingContext" /> instance that contains the destination of the serialized stream that is associated with the new <see cref="T:System.Net.Mail.SmtpFailedRecipientException" />. </param>
|
||||
// Token: 0x06000B61 RID: 2913 RVA: 0x00022F1C File Offset: 0x0002111C
|
||||
void ISerializable.GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext)
|
||||
{
|
||||
this.GetObjectData(serializationInfo, streamingContext);
|
||||
}
|
||||
|
||||
/// <summary>Indicates the e-mail address with delivery difficulties.</summary>
|
||||
/// <returns>A <see cref="T:System.String" /> that contains the e-mail address.</returns>
|
||||
// Token: 0x170002D9 RID: 729
|
||||
// (get) Token: 0x06000B62 RID: 2914 RVA: 0x00022F28 File Offset: 0x00021128
|
||||
public string FailedRecipient
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.failedRecipient;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo" /> instance with the data that is needed to serialize the <see cref="T:System.Net.Mail.SmtpFailedRecipientException" />.</summary>
|
||||
/// <param name="serializationInfo">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> to populate with data. </param>
|
||||
/// <param name="streamingContext">A <see cref="T:System.Runtime.Serialization.StreamingContext" /> that specifies the destination for this serialization.</param>
|
||||
// Token: 0x06000B63 RID: 2915 RVA: 0x00022F30 File Offset: 0x00021130
|
||||
public override void GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext)
|
||||
{
|
||||
if (serializationInfo == null)
|
||||
{
|
||||
throw new ArgumentNullException("serializationInfo");
|
||||
}
|
||||
base.GetObjectData(serializationInfo, streamingContext);
|
||||
serializationInfo.AddValue("failedRecipient", this.failedRecipient);
|
||||
}
|
||||
|
||||
// Token: 0x04000B58 RID: 2904
|
||||
private string failedRecipient;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace System.Net.Mail
|
||||
{
|
||||
/// <summary>The exception that is thrown when e-mail is sent using an <see cref="T:System.Net.Mail.SmtpClient" /> and cannot be delivered to all recipients.</summary>
|
||||
// Token: 0x0200014C RID: 332
|
||||
[Serializable]
|
||||
public class SmtpFailedRecipientsException : SmtpFailedRecipientException, ISerializable
|
||||
{
|
||||
/// <summary>Initializes an empty instance of the <see cref="T:System.Net.Mail.SmtpFailedRecipientsException" /> class.</summary>
|
||||
// Token: 0x06000B64 RID: 2916 RVA: 0x00022F68 File Offset: 0x00021168
|
||||
public SmtpFailedRecipientsException()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Net.Mail.SmtpFailedRecipientsException" /> class with the specified <see cref="T:System.String" />.</summary>
|
||||
/// <param name="message">The exception message.</param>
|
||||
// Token: 0x06000B65 RID: 2917 RVA: 0x00022F70 File Offset: 0x00021170
|
||||
public SmtpFailedRecipientsException(string message)
|
||||
: base(message)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Net.Mail.SmtpFailedRecipientsException" /> class with the specified <see cref="T:System.String" /> and inner <see cref="T:System.Exception" />.</summary>
|
||||
/// <param name="message">The exception message.</param>
|
||||
/// <param name="innerException">The inner exception.</param>
|
||||
// Token: 0x06000B66 RID: 2918 RVA: 0x00022F7C File Offset: 0x0002117C
|
||||
public SmtpFailedRecipientsException(string message, Exception innerException)
|
||||
: base(message, innerException)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Net.Mail.SmtpFailedRecipientsException" /> class with the specified <see cref="T:System.String" /> and array of type <see cref="T:System.Net.Mail.SmtpFailedRecipientException" />.</summary>
|
||||
/// <param name="message">The exception message.</param>
|
||||
/// <param name="innerExceptions">The array of recipients with delivery errors.</param>
|
||||
// Token: 0x06000B67 RID: 2919 RVA: 0x00022F88 File Offset: 0x00021188
|
||||
public SmtpFailedRecipientsException(string message, SmtpFailedRecipientException[] innerExceptions)
|
||||
: base(message)
|
||||
{
|
||||
this.innerExceptions = innerExceptions;
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Net.Mail.SmtpFailedRecipientsException" /> class from the specified instances of the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> and <see cref="T:System.Runtime.Serialization.StreamingContext" /> classes.</summary>
|
||||
/// <param name="info">A <see cref="T:System.Runtime.Serialization.SerializationInfo" /> instance that contains the information required to serialize the new <see cref="T:System.Net.Mail.SmtpFailedRecipientsException" /> instance. </param>
|
||||
/// <param name="context">A <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains the source of the serialized stream that is associated with the new <see cref="T:System.Net.Mail.SmtpFailedRecipientsException" /> instance. </param>
|
||||
// Token: 0x06000B68 RID: 2920 RVA: 0x00022F98 File Offset: 0x00021198
|
||||
protected SmtpFailedRecipientsException(SerializationInfo info, StreamingContext context)
|
||||
: base(info, context)
|
||||
{
|
||||
if (info == null)
|
||||
{
|
||||
throw new ArgumentNullException("info");
|
||||
}
|
||||
this.innerExceptions = (SmtpFailedRecipientException[])info.GetValue("innerExceptions", typeof(SmtpFailedRecipientException[]));
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Net.Mail.SmtpFailedRecipientsException" /> class from the specified <see cref="T:System.Runtime.Serialization.SerializationInfo" /> and <see cref="T:System.Runtime.Serialization.StreamingContext" /> instances.</summary>
|
||||
/// <param name="serializationInfo">A <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that contains the information required to serialize the new <see cref="T:System.Net.Mail.SmtpFailedRecipientsException" />. </param>
|
||||
/// <param name="streamingContext">A <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains the source of the serialized stream that is associated with the new <see cref="T:System.Net.Mail.SmtpFailedRecipientsException" />. </param>
|
||||
// Token: 0x06000B69 RID: 2921 RVA: 0x00022FD4 File Offset: 0x000211D4
|
||||
void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
this.GetObjectData(info, context);
|
||||
}
|
||||
|
||||
/// <summary>Gets one or more <see cref="T:System.Net.Mail.SmtpFailedRecipientException" />s that indicate the e-mail recipients with SMTP delivery errors.</summary>
|
||||
/// <returns>An array of type <see cref="T:System.Net.Mail.SmtpFailedRecipientException" /> that lists the recipients with delivery errors.</returns>
|
||||
// Token: 0x170002DA RID: 730
|
||||
// (get) Token: 0x06000B6A RID: 2922 RVA: 0x00022FE0 File Offset: 0x000211E0
|
||||
public SmtpFailedRecipientException[] InnerExceptions
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.innerExceptions;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo" /> instance with the data that is needed to serialize the <see cref="T:System.Net.Mail.SmtpFailedRecipientsException" />.</summary>
|
||||
/// <param name="serializationInfo">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> to be used. </param>
|
||||
/// <param name="streamingContext">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> to be used. </param>
|
||||
// Token: 0x06000B6B RID: 2923 RVA: 0x00022FE8 File Offset: 0x000211E8
|
||||
public override void GetObjectData(SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
if (info == null)
|
||||
{
|
||||
throw new ArgumentNullException("info");
|
||||
}
|
||||
base.GetObjectData(info, context);
|
||||
info.AddValue("innerExceptions", this.innerExceptions);
|
||||
}
|
||||
|
||||
// Token: 0x04000B59 RID: 2905
|
||||
private SmtpFailedRecipientException[] innerExceptions;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.Mail
|
||||
{
|
||||
/// <summary>Specifies the outcome of sending e-mail by using the <see cref="T:System.Net.Mail.SmtpClient" /> class.</summary>
|
||||
// Token: 0x0200014D RID: 333
|
||||
public enum SmtpStatusCode
|
||||
{
|
||||
/// <summary>The commands were sent in the incorrect sequence.</summary>
|
||||
// Token: 0x04000B5B RID: 2907
|
||||
BadCommandSequence = 503,
|
||||
/// <summary>The specified user is not local, but the receiving SMTP service accepted the message and attempted to deliver it. This status code is defined in RFC 1123, which is available at http://www.ietf.org.</summary>
|
||||
// Token: 0x04000B5C RID: 2908
|
||||
CannotVerifyUserWillAttemptDelivery = 252,
|
||||
/// <summary>The client was not authenticated or is not allowed to send mail using the specified SMTP host.</summary>
|
||||
// Token: 0x04000B5D RID: 2909
|
||||
ClientNotPermitted = 454,
|
||||
/// <summary>The SMTP service does not implement the specified command.</summary>
|
||||
// Token: 0x04000B5E RID: 2910
|
||||
CommandNotImplemented = 502,
|
||||
/// <summary>The SMTP service does not implement the specified command parameter.</summary>
|
||||
// Token: 0x04000B5F RID: 2911
|
||||
CommandParameterNotImplemented = 504,
|
||||
/// <summary>The SMTP service does not recognize the specified command.</summary>
|
||||
// Token: 0x04000B60 RID: 2912
|
||||
CommandUnrecognized = 500,
|
||||
/// <summary>The message is too large to be stored in the destination mailbox.</summary>
|
||||
// Token: 0x04000B61 RID: 2913
|
||||
ExceededStorageAllocation = 552,
|
||||
/// <summary>The transaction could not occur. You receive this error when the specified SMTP host cannot be found.</summary>
|
||||
// Token: 0x04000B62 RID: 2914
|
||||
GeneralFailure = -1,
|
||||
/// <summary>A Help message was returned by the service.</summary>
|
||||
// Token: 0x04000B63 RID: 2915
|
||||
HelpMessage = 214,
|
||||
/// <summary>The SMTP service does not have sufficient storage to complete the request.</summary>
|
||||
// Token: 0x04000B64 RID: 2916
|
||||
InsufficientStorage = 452,
|
||||
/// <summary>The SMTP service cannot complete the request. This error can occur if the client's IP address cannot be resolved (that is, a reverse lookup failed). You can also receive this error if the client domain has been identified as an open relay or source for unsolicited e-mail (spam). For details, see RFC 2505, which is available at http://www.ietf.org.</summary>
|
||||
// Token: 0x04000B65 RID: 2917
|
||||
LocalErrorInProcessing = 451,
|
||||
/// <summary>The destination mailbox is in use.</summary>
|
||||
// Token: 0x04000B66 RID: 2918
|
||||
MailboxBusy = 450,
|
||||
/// <summary>The syntax used to specify the destination mailbox is incorrect.</summary>
|
||||
// Token: 0x04000B67 RID: 2919
|
||||
MailboxNameNotAllowed = 553,
|
||||
/// <summary>The destination mailbox was not found or could not be accessed.</summary>
|
||||
// Token: 0x04000B68 RID: 2920
|
||||
MailboxUnavailable = 550,
|
||||
/// <summary>The email was successfully sent to the SMTP service.</summary>
|
||||
// Token: 0x04000B69 RID: 2921
|
||||
Ok = 250,
|
||||
/// <summary>The SMTP service is closing the transmission channel.</summary>
|
||||
// Token: 0x04000B6A RID: 2922
|
||||
ServiceClosingTransmissionChannel = 221,
|
||||
/// <summary>The SMTP service is not available; the server is closing the transmission channel.</summary>
|
||||
// Token: 0x04000B6B RID: 2923
|
||||
ServiceNotAvailable = 421,
|
||||
/// <summary>The SMTP service is ready.</summary>
|
||||
// Token: 0x04000B6C RID: 2924
|
||||
ServiceReady = 220,
|
||||
/// <summary>The SMTP service is ready to receive the e-mail content.</summary>
|
||||
// Token: 0x04000B6D RID: 2925
|
||||
StartMailInput = 354,
|
||||
/// <summary>The syntax used to specify a command or parameter is incorrect.</summary>
|
||||
// Token: 0x04000B6E RID: 2926
|
||||
SyntaxError = 501,
|
||||
/// <summary>A system status or system Help reply.</summary>
|
||||
// Token: 0x04000B6F RID: 2927
|
||||
SystemStatus = 211,
|
||||
/// <summary>The transaction failed.</summary>
|
||||
// Token: 0x04000B70 RID: 2928
|
||||
TransactionFailed = 554,
|
||||
/// <summary>The user mailbox is not located on the receiving server. You should resend using the supplied address information.</summary>
|
||||
// Token: 0x04000B71 RID: 2929
|
||||
UserNotLocalTryAlternatePath = 551,
|
||||
/// <summary>The user mailbox is not located on the receiving server; the server forwards the e-mail.</summary>
|
||||
// Token: 0x04000B72 RID: 2930
|
||||
UserNotLocalWillForward = 251,
|
||||
/// <summary>The SMTP server is configured to accept only TLS connections, and the SMTP client is attempting to connect by using a non-TLS connection. The solution is for the user to set EnableSsl=true on the SMTP Client.</summary>
|
||||
// Token: 0x04000B73 RID: 2931
|
||||
MustIssueStartTlsFirst = 530
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user