public void GetFrom() { // Create the email message. var configuration = this.GetValidDefaultConfiguration(); var emailMessage = this.CreateEmailMessage(configuration); var address = new MFilesAPI.Extensions.Email.EmailAddress("*****@*****.**", "M-Files Developer Support"); emailMessage.SetFrom(address); // Ensure the from is as specified. var from = emailMessage.GetFrom(); Assert.IsNotNull(from); Assert.AreEqual(address.Address, from.Address); Assert.AreEqual(address.DisplayName, from.DisplayName); }
public void SetSender() { // Create the email message. var emailMessage = this.CreateEmailMessage(); // Create the sender. var address = new MFilesAPI.Extensions.Email.EmailAddress("*****@*****.**", "M-Files Developer Support"); emailMessage.SetSender(address); // Ensure the sender is as specified in the configuration. var sender = emailMessage.GetSender(); Assert.IsNotNull(sender); Assert.AreEqual(address.Address, sender.Address); Assert.AreEqual(address.DisplayName, sender.DisplayName); }
public void ReplyToList() { // Create the email message. var configuration = this.GetValidDefaultConfiguration(); var emailMessage = this.CreateEmailMessage(configuration); var address1 = new MFilesAPI.Extensions.Email.EmailAddress("*****@*****.**", "M-Files Developer Support"); var address2 = new MFilesAPI.Extensions.Email.EmailAddress("*****@*****.**", "M-Files Developer Support"); emailMessage.SetReplyToList(new List <Extensions.Email.EmailAddress>() { address1, address2 }); // Ensure the list is as specified. var list = emailMessage.GetReplyToList(); Assert.IsNotNull(list); Assert.AreEqual(2, list.Count); Assert.AreEqual(address1.Address, list[0].Address); Assert.AreEqual(address1.DisplayName, list[0].DisplayName); Assert.AreEqual(address2.Address, list[1].Address); Assert.AreEqual(address2.DisplayName, list[1].DisplayName); }