public void balance() { IAppConfig appConfig = new MailAppConfig("appid", "appkey", SignType.sha1); MailBalance submail = new MailBalance(appConfig); string returnMessage = string.Empty; submail.Balance(out returnMessage); Console.WriteLine(returnMessage); Console.ReadKey(); }
public void UnSubscribe() { IAppConfig mailConfig = new MailAppConfig("appid", "appkey"); AddressBookMail addressBookMail = new AddressBookMail(mailConfig); addressBookMail.SetAddress("*****@*****.**", "leo"); string outMessage = string.Empty; addressBookMail.UnSubscribe(out outMessage); Console.WriteLine(outMessage); Console.ReadKey(); }
public void UnSubscribe() { IAppConfig mailConfig = new MailAppConfig("10050", "2be0927e1628e16e1ccdb6f5800caac9"); AddressBookMail addressBookMail = new AddressBookMail(mailConfig); addressBookMail.SetAddress("*****@*****.**", "leo"); string outMessage = string.Empty; bool issuccess = addressBookMail.UnSubscribe(out outMessage); if (!issuccess) { Console.WriteLine(outMessage); } }
public void SendMail() { IAppConfig mailConfig = new MailAppConfig("apppid", "appkey"); MailXSend submail = new MailXSend(mailConfig); submail.AddTo("*****@*****.**", "joe"); submail.SetSender("*****@*****.**", "leo"); submail.SetProject("7pfhZ3"); submail.AddHeaders("X-Accept", "zh-cn"); submail.AddHeaders("X-Mailer", "leo App"); string resultMessge = string.Empty; submail.XSend(out resultMessge); Console.WriteLine(resultMessge); }
public void SendMail() { IAppConfig mailConfig = new MailAppConfig("10050", "2be0927e1628e16e1ccdb6f5800caac9"); MailXSend submail = new MailXSend(mailConfig); submail.AddTo("*****@*****.**", "joe"); submail.SetSender("*****@*****.**", "leo"); submail.SetProject("7pfhZ3"); submail.AddHeaders("X-Accept", "zh-cn"); submail.AddHeaders("X-Mailer", "leo App"); string resultMessge = string.Empty; if (submail.XSend(out resultMessge) == false) { Console.WriteLine(resultMessge); } }
public void SendMail() { IAppConfig mailConfig = new MailAppConfig("apppid", "appkey", SignType.sha1); MailSend submail = new MailSend(mailConfig); submail.AddTo("*****@*****.**", "joe"); submail.AddCc("*****@*****.**", "leo"); submail.AddBcc("*****@*****.**", "leo"); submail.SetSender("*****@*****.**", "leo"); submail.SetReply("*****@*****.**"); submail.SetSubject("发送历史与明细"); submail.SetText("发送历史与明细"); //submail.AddAttachment(@"C:\attachment.txt"); string resultMessage = string.Empty; submail.Send(out resultMessage); Console.WriteLine(resultMessage); }
public void SendMail() { IAppConfig mailConfig = new MailAppConfig("10050", "2be0927e1628e16e1ccdb6f5800caac9", SignType.sha1); MailSend submail = new MailSend(mailConfig); submail.AddTo("*****@*****.**", "joe"); submail.AddCc("*****@*****.**", "leo"); submail.AddBcc("*****@*****.**", "leo"); submail.SetSender("*****@*****.**", "leo"); submail.SetReply("*****@*****.**"); submail.SetSubject("发送历史与明细"); submail.SetText("发送历史与明细"); submail.AddAttachment(@"C:\attachment.txt"); string resultMessage = string.Empty; if (submail.Send(out resultMessage) == false) { Console.WriteLine(resultMessage); } }