public void SendHtmlEmail()
 {
     var ses = new Email(AWS.Credentials);
     Assert.IsTrue(
         ses.Send(
             @"*****@*****.**",
             @"*****@*****.**",
             "Test HTML Message",
             File.ReadAllText(_localTestContext.Properties["HTMLFile"].ToString()),
             true));
     Assert.IsTrue(!string.IsNullOrWhiteSpace(ses.MessageId));
     Console.Out.WriteLine("Message AwsAssignedId: {0}", ses.MessageId);
 }
 public void SendPlainTextEmail()
 {
     var ses = new Email(AWS.Credentials);
     Assert.IsTrue(
         ses.Send(
             @"*****@*****.**",
             @"*****@*****.**",
             "Test Message",
             "Sent from a test method in the NAV.AWS framework",
             false),
         ses.ErrorMessage);
     Assert.IsTrue(!string.IsNullOrWhiteSpace(ses.MessageId));
     Console.Out.WriteLine("Message AwsAssignedId: {0}", ses.MessageId);
 }
 /// <summary>Constructor.</summary>
 /// <exception cref="ArgumentNullException">email.</exception>
 /// <param name="email">The Email object.</param>
 internal FormattedEmail(Email email)
 {
     if (email == null) throw new ArgumentNullException("email");
     _email = email;
 }
 public void SendRawEmail()
 {
     var ses = new Email(AWS.Credentials);
     ses.AddToAddress(@"*****@*****.**");
     ses.FromAddress = @"*****@*****.**";
     ses.AttachmentFilePath = _localTestContext.Properties["AttachmentFile"].ToString();
     ses.HTML = true;
     ses.MessageBody = File.ReadAllText(_localTestContext.Properties["HTMLFile"].ToString());
     ses.MessageSubject = "Test HTML Message (With PDF Attachment)";
     Assert.IsTrue(ses.Send());
     Assert.IsTrue(!string.IsNullOrWhiteSpace(ses.MessageId));
     Console.Out.WriteLine("Message AwsAssignedId: {0}", ses.MessageId);
 }