Exemplo n.º 1
0
        private String registerContact(String apiKey)
        {

            MailAdapterWs.MailAdapter dialogueService = new MailAdapterWs.MailAdapter();

            KeyValuePair[] ContactInfos = new KeyValuePair[3];
            KeyValuePair ContactInfo = new KeyValuePair();
            ContactInfo.key = "email";
            ContactInfo.value = "*****@*****.**";
            ContactInfos[0] = ContactInfo;
            ContactInfo = new KeyValuePair();
            ContactInfo.key = "username";
            ContactInfo.value = "周安平";
            ContactInfos[1] = ContactInfo;
            ContactInfo = new KeyValuePair();
            ContactInfo.key = "password";
            ContactInfo.value = "12234234";
            ContactInfos[2] = ContactInfo;
            return dialogueService.registerContact(apiKey, ContactInfos);
        }
Exemplo n.º 2
0
 /// <remarks/>
 public void registerContactAsync(string apiKey, KeyValuePair[] ContactInfos, object userState) {
     if ((this.registerContactOperationCompleted == null)) {
         this.registerContactOperationCompleted = new System.Threading.SendOrPostCallback(this.OnregisterContactOperationCompleted);
     }
     this.InvokeAsync("registerContact", new object[] {
                 apiKey,
                 ContactInfos}, this.registerContactOperationCompleted, userState);
 }
Exemplo n.º 3
0
        private String sendSingleMail(String apiKey)
        {
            MailAdapterWs.MailAdapter dialogueService = new MailAdapterWs.MailAdapter();
            String fromName = "周安平";
            String fromAddress = "*****@*****.**";
            String subject = "51Job祝您生日快乐! ";
            String reportReceiveAddress = "*****@*****.**";
            String mailBody = System.IO.File.ReadAllText("../../Example/template.html");

            KeyValuePair[] ContactInfos = new KeyValuePair[3];
            KeyValuePair ContactInfo = new KeyValuePair();
            ContactInfo.key = "email";
            ContactInfo.value = "*****@*****.**";
            ContactInfos[0] = ContactInfo;
            ContactInfo = new KeyValuePair();
            ContactInfo.key = "username";
            ContactInfo.value = "周安平";
            ContactInfos[1] = ContactInfo;
            ContactInfo = new KeyValuePair();
            ContactInfo.key = "password";
            ContactInfo.value = "12234234";
            ContactInfos[2] = ContactInfo;
            return dialogueService.sendSingleEmail(apiKey, fromName, fromAddress, subject, reportReceiveAddress, mailBody, ContactInfos);
        }
Exemplo n.º 4
0
 /// <remarks/>
 public void registerContactAsync(string apiKey, KeyValuePair[] ContactInfos) {
     this.registerContactAsync(apiKey, ContactInfos, null);
 }
Exemplo n.º 5
0
 public string registerContact(string apiKey, KeyValuePair[] ContactInfos) {
     object[] results = this.Invoke("registerContact", new object[] {
                 apiKey,
                 ContactInfos});
     return ((string)(results[0]));
 }
Exemplo n.º 6
0
 /// <remarks/>
 public void sendSingleEmailAsync(string apiKey, string fromName, string fromAddress, string subject, string reportReceiveAddress, string mailBody, KeyValuePair[] ContactInfos, object userState) {
     if ((this.sendSingleEmailOperationCompleted == null)) {
         this.sendSingleEmailOperationCompleted = new System.Threading.SendOrPostCallback(this.OnsendSingleEmailOperationCompleted);
     }
     this.InvokeAsync("sendSingleEmail", new object[] {
                 apiKey,
                 fromName,
                 fromAddress,
                 subject,
                 reportReceiveAddress,
                 mailBody,
                 ContactInfos}, this.sendSingleEmailOperationCompleted, userState);
 }
Exemplo n.º 7
0
 /// <remarks/>
 public void sendSingleEmailAsync(string apiKey, string fromName, string fromAddress, string subject, string reportReceiveAddress, string mailBody, KeyValuePair[] ContactInfos) {
     this.sendSingleEmailAsync(apiKey, fromName, fromAddress, subject, reportReceiveAddress, mailBody, ContactInfos, null);
 }
Exemplo n.º 8
0
 public string sendSingleEmail(string apiKey, string fromName, string fromAddress, string subject, string reportReceiveAddress, string mailBody, KeyValuePair[] ContactInfos) {
     object[] results = this.Invoke("sendSingleEmail", new object[] {
                 apiKey,
                 fromName,
                 fromAddress,
                 subject,
                 reportReceiveAddress,
                 mailBody,
                 ContactInfos});
     return ((string)(results[0]));
 }