370 lines
17 KiB
C#
370 lines
17 KiB
C#
//------------------------------------------------------------------------------
|
|
// <auto-generated>
|
|
// This code was generated by a tool.
|
|
// Runtime Version:4.0.30319.261
|
|
//
|
|
// Changes to this file may cause incorrect behavior and will be lost if
|
|
// the code is regenerated.
|
|
// </auto-generated>
|
|
//------------------------------------------------------------------------------
|
|
|
|
//
|
|
// This source code was auto-generated by Microsoft.VSDesigner, Version 4.0.30319.261.
|
|
//
|
|
#pragma warning disable 1591
|
|
|
|
namespace SEILoader.SendEmail {
|
|
using System;
|
|
using System.Web.Services;
|
|
using System.Diagnostics;
|
|
using System.Web.Services.Protocols;
|
|
using System.ComponentModel;
|
|
using System.Xml.Serialization;
|
|
|
|
|
|
/// <remarks/>
|
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")]
|
|
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
|
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
|
[System.Web.Services.WebServiceBindingAttribute(Name="SendEMailSoap", Namespace="http://localhost/SendEmail")]
|
|
public partial class SendEMail : System.Web.Services.Protocols.SoapHttpClientProtocol {
|
|
|
|
private System.Threading.SendOrPostCallback SendMailFromToOperationCompleted;
|
|
|
|
private System.Threading.SendOrPostCallback SendMailFromToCCOperationCompleted;
|
|
|
|
private System.Threading.SendOrPostCallback SendMailWithoutAttachOperationCompleted;
|
|
|
|
private System.Threading.SendOrPostCallback SendMailOperationCompleted;
|
|
|
|
private bool useDefaultCredentialsSetExplicitly;
|
|
|
|
/// <remarks/>
|
|
public SendEMail() {
|
|
this.Url = global::SEILoader.Properties.Settings.Default.SEILoader_SendEmail_SendEMail;
|
|
if ((this.IsLocalFileSystemWebService(this.Url) == true)) {
|
|
this.UseDefaultCredentials = true;
|
|
this.useDefaultCredentialsSetExplicitly = false;
|
|
}
|
|
else {
|
|
this.useDefaultCredentialsSetExplicitly = true;
|
|
}
|
|
}
|
|
|
|
public new string Url {
|
|
get {
|
|
return base.Url;
|
|
}
|
|
set {
|
|
if ((((this.IsLocalFileSystemWebService(base.Url) == true)
|
|
&& (this.useDefaultCredentialsSetExplicitly == false))
|
|
&& (this.IsLocalFileSystemWebService(value) == false))) {
|
|
base.UseDefaultCredentials = false;
|
|
}
|
|
base.Url = value;
|
|
}
|
|
}
|
|
|
|
public new bool UseDefaultCredentials {
|
|
get {
|
|
return base.UseDefaultCredentials;
|
|
}
|
|
set {
|
|
base.UseDefaultCredentials = value;
|
|
this.useDefaultCredentialsSetExplicitly = true;
|
|
}
|
|
}
|
|
|
|
/// <remarks/>
|
|
public event SendMailFromToCompletedEventHandler SendMailFromToCompleted;
|
|
|
|
/// <remarks/>
|
|
public event SendMailFromToCCCompletedEventHandler SendMailFromToCCCompleted;
|
|
|
|
/// <remarks/>
|
|
public event SendMailWithoutAttachCompletedEventHandler SendMailWithoutAttachCompleted;
|
|
|
|
/// <remarks/>
|
|
public event SendMailCompletedEventHandler SendMailCompleted;
|
|
|
|
/// <remarks/>
|
|
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://localhost/SendEmail/SendMailFromTo", RequestNamespace="http://localhost/SendEmail", ResponseNamespace="http://localhost/SendEmail", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
|
public bool SendMailFromTo(string from, string TOs, string subject, string mess, byte[][] attachs) {
|
|
object[] results = this.Invoke("SendMailFromTo", new object[] {
|
|
from,
|
|
TOs,
|
|
subject,
|
|
mess,
|
|
attachs});
|
|
return ((bool)(results[0]));
|
|
}
|
|
|
|
/// <remarks/>
|
|
public void SendMailFromToAsync(string from, string TOs, string subject, string mess, byte[][] attachs) {
|
|
this.SendMailFromToAsync(from, TOs, subject, mess, attachs, null);
|
|
}
|
|
|
|
/// <remarks/>
|
|
public void SendMailFromToAsync(string from, string TOs, string subject, string mess, byte[][] attachs, object userState) {
|
|
if ((this.SendMailFromToOperationCompleted == null)) {
|
|
this.SendMailFromToOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSendMailFromToOperationCompleted);
|
|
}
|
|
this.InvokeAsync("SendMailFromTo", new object[] {
|
|
from,
|
|
TOs,
|
|
subject,
|
|
mess,
|
|
attachs}, this.SendMailFromToOperationCompleted, userState);
|
|
}
|
|
|
|
private void OnSendMailFromToOperationCompleted(object arg) {
|
|
if ((this.SendMailFromToCompleted != null)) {
|
|
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
|
this.SendMailFromToCompleted(this, new SendMailFromToCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
|
}
|
|
}
|
|
|
|
/// <remarks/>
|
|
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://localhost/SendEmail/SendMailFromToCC", RequestNamespace="http://localhost/SendEmail", ResponseNamespace="http://localhost/SendEmail", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
|
public bool SendMailFromToCC(string from, string TOs, string CCs, string subject, string mess, byte[][] attachs) {
|
|
object[] results = this.Invoke("SendMailFromToCC", new object[] {
|
|
from,
|
|
TOs,
|
|
CCs,
|
|
subject,
|
|
mess,
|
|
attachs});
|
|
return ((bool)(results[0]));
|
|
}
|
|
|
|
/// <remarks/>
|
|
public void SendMailFromToCCAsync(string from, string TOs, string CCs, string subject, string mess, byte[][] attachs) {
|
|
this.SendMailFromToCCAsync(from, TOs, CCs, subject, mess, attachs, null);
|
|
}
|
|
|
|
/// <remarks/>
|
|
public void SendMailFromToCCAsync(string from, string TOs, string CCs, string subject, string mess, byte[][] attachs, object userState) {
|
|
if ((this.SendMailFromToCCOperationCompleted == null)) {
|
|
this.SendMailFromToCCOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSendMailFromToCCOperationCompleted);
|
|
}
|
|
this.InvokeAsync("SendMailFromToCC", new object[] {
|
|
from,
|
|
TOs,
|
|
CCs,
|
|
subject,
|
|
mess,
|
|
attachs}, this.SendMailFromToCCOperationCompleted, userState);
|
|
}
|
|
|
|
private void OnSendMailFromToCCOperationCompleted(object arg) {
|
|
if ((this.SendMailFromToCCCompleted != null)) {
|
|
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
|
this.SendMailFromToCCCompleted(this, new SendMailFromToCCCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
|
}
|
|
}
|
|
|
|
/// <remarks/>
|
|
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://localhost/SendEmail/SendMailWithoutAttach", RequestNamespace="http://localhost/SendEmail", ResponseNamespace="http://localhost/SendEmail", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
|
public bool SendMailWithoutAttach(string from, string TOs, string CCs, string BCCs, string subject, string mess) {
|
|
object[] results = this.Invoke("SendMailWithoutAttach", new object[] {
|
|
from,
|
|
TOs,
|
|
CCs,
|
|
BCCs,
|
|
subject,
|
|
mess});
|
|
return ((bool)(results[0]));
|
|
}
|
|
|
|
/// <remarks/>
|
|
public void SendMailWithoutAttachAsync(string from, string TOs, string CCs, string BCCs, string subject, string mess) {
|
|
this.SendMailWithoutAttachAsync(from, TOs, CCs, BCCs, subject, mess, null);
|
|
}
|
|
|
|
/// <remarks/>
|
|
public void SendMailWithoutAttachAsync(string from, string TOs, string CCs, string BCCs, string subject, string mess, object userState) {
|
|
if ((this.SendMailWithoutAttachOperationCompleted == null)) {
|
|
this.SendMailWithoutAttachOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSendMailWithoutAttachOperationCompleted);
|
|
}
|
|
this.InvokeAsync("SendMailWithoutAttach", new object[] {
|
|
from,
|
|
TOs,
|
|
CCs,
|
|
BCCs,
|
|
subject,
|
|
mess}, this.SendMailWithoutAttachOperationCompleted, userState);
|
|
}
|
|
|
|
private void OnSendMailWithoutAttachOperationCompleted(object arg) {
|
|
if ((this.SendMailWithoutAttachCompleted != null)) {
|
|
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
|
this.SendMailWithoutAttachCompleted(this, new SendMailWithoutAttachCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
|
}
|
|
}
|
|
|
|
/// <remarks/>
|
|
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://localhost/SendEmail/SendMail", RequestNamespace="http://localhost/SendEmail", ResponseNamespace="http://localhost/SendEmail", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
|
public bool SendMail(string from, string TOs, string CCs, string BCCs, string subject, string mess, byte[][] attachs) {
|
|
object[] results = this.Invoke("SendMail", new object[] {
|
|
from,
|
|
TOs,
|
|
CCs,
|
|
BCCs,
|
|
subject,
|
|
mess,
|
|
attachs});
|
|
return ((bool)(results[0]));
|
|
}
|
|
|
|
/// <remarks/>
|
|
public void SendMailAsync(string from, string TOs, string CCs, string BCCs, string subject, string mess, byte[][] attachs) {
|
|
this.SendMailAsync(from, TOs, CCs, BCCs, subject, mess, attachs, null);
|
|
}
|
|
|
|
/// <remarks/>
|
|
public void SendMailAsync(string from, string TOs, string CCs, string BCCs, string subject, string mess, byte[][] attachs, object userState) {
|
|
if ((this.SendMailOperationCompleted == null)) {
|
|
this.SendMailOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSendMailOperationCompleted);
|
|
}
|
|
this.InvokeAsync("SendMail", new object[] {
|
|
from,
|
|
TOs,
|
|
CCs,
|
|
BCCs,
|
|
subject,
|
|
mess,
|
|
attachs}, this.SendMailOperationCompleted, userState);
|
|
}
|
|
|
|
private void OnSendMailOperationCompleted(object arg) {
|
|
if ((this.SendMailCompleted != null)) {
|
|
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
|
this.SendMailCompleted(this, new SendMailCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
|
}
|
|
}
|
|
|
|
/// <remarks/>
|
|
public new void CancelAsync(object userState) {
|
|
base.CancelAsync(userState);
|
|
}
|
|
|
|
private bool IsLocalFileSystemWebService(string url) {
|
|
if (((url == null)
|
|
|| (url == string.Empty))) {
|
|
return false;
|
|
}
|
|
System.Uri wsUri = new System.Uri(url);
|
|
if (((wsUri.Port >= 1024)
|
|
&& (string.Compare(wsUri.Host, "localHost", System.StringComparison.OrdinalIgnoreCase) == 0))) {
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
}
|
|
|
|
/// <remarks/>
|
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")]
|
|
public delegate void SendMailFromToCompletedEventHandler(object sender, SendMailFromToCompletedEventArgs e);
|
|
|
|
/// <remarks/>
|
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")]
|
|
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
|
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
|
public partial class SendMailFromToCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
|
|
|
private object[] results;
|
|
|
|
internal SendMailFromToCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
|
base(exception, cancelled, userState) {
|
|
this.results = results;
|
|
}
|
|
|
|
/// <remarks/>
|
|
public bool Result {
|
|
get {
|
|
this.RaiseExceptionIfNecessary();
|
|
return ((bool)(this.results[0]));
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <remarks/>
|
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")]
|
|
public delegate void SendMailFromToCCCompletedEventHandler(object sender, SendMailFromToCCCompletedEventArgs e);
|
|
|
|
/// <remarks/>
|
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")]
|
|
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
|
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
|
public partial class SendMailFromToCCCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
|
|
|
private object[] results;
|
|
|
|
internal SendMailFromToCCCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
|
base(exception, cancelled, userState) {
|
|
this.results = results;
|
|
}
|
|
|
|
/// <remarks/>
|
|
public bool Result {
|
|
get {
|
|
this.RaiseExceptionIfNecessary();
|
|
return ((bool)(this.results[0]));
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <remarks/>
|
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")]
|
|
public delegate void SendMailWithoutAttachCompletedEventHandler(object sender, SendMailWithoutAttachCompletedEventArgs e);
|
|
|
|
/// <remarks/>
|
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")]
|
|
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
|
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
|
public partial class SendMailWithoutAttachCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
|
|
|
private object[] results;
|
|
|
|
internal SendMailWithoutAttachCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
|
base(exception, cancelled, userState) {
|
|
this.results = results;
|
|
}
|
|
|
|
/// <remarks/>
|
|
public bool Result {
|
|
get {
|
|
this.RaiseExceptionIfNecessary();
|
|
return ((bool)(this.results[0]));
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <remarks/>
|
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")]
|
|
public delegate void SendMailCompletedEventHandler(object sender, SendMailCompletedEventArgs e);
|
|
|
|
/// <remarks/>
|
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")]
|
|
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
|
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
|
public partial class SendMailCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
|
|
|
private object[] results;
|
|
|
|
internal SendMailCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
|
base(exception, cancelled, userState) {
|
|
this.results = results;
|
|
}
|
|
|
|
/// <remarks/>
|
|
public bool Result {
|
|
get {
|
|
this.RaiseExceptionIfNecessary();
|
|
return ((bool)(this.results[0]));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
#pragma warning restore 1591 |