static private CreateMIME ( EmailType type, string from, string to, string subject, string body ) : string | ||
type | EmailType | The email message body type. |
from | string | The email address of sender. |
to | string | The email address of recipient. |
subject | string | The email subject. |
body | string | The email body content. |
return | string |
/// <summary> /// The method is used to send a mail /// </summary> /// <param name="emailType">The type of the email.</param> /// <param name="subject">The subject of the mail.</param> /// <param name="body">The body of the item.</param> protected void SendEmail(EmailType emailType, string subject, string body) { SendMailRequest request = new SendMailRequest { RequestData = { ClientId = Guid.NewGuid().ToString("N"), Mime = TestSuiteHelper.CreateMIME( emailType, Common.GetMailAddress(this.User1Information.UserName, this.User1Information.UserDomain), Common.GetMailAddress(this.User2Information.UserName, this.User2Information.UserDomain), subject, body) } }; SendMailResponse sendMailResponse = this.ASAIRSAdapter.SendMail(request); this.Site.Assert.AreEqual <string>( string.Empty, sendMailResponse.ResponseDataXML, "The server should return an empty XML body to indicate SendMail command is executed successfully."); this.SwitchUser(this.User2Information, true); this.RecordCaseRelativeItems(this.User2Information.UserName, this.User2Information.InboxCollectionId, subject); }