public void testFilesAsBody() { MailTask mailTask = new MailTask(); mailTask.Project = new Project(); _tolist = _emailAddress1; _subject = "Msg 6: Files for message"; _message = "Test message"; foreach (string fileName in _fileList) { _files += fileName + ";"; } // add bogus entry _files += "BogusFile.txt"; try { mailTask.Mailhost = _mailhost; mailTask.From = _from; mailTask.ToList = _tolist; mailTask.Subject = _subject; mailTask.Message = _message; mailTask.CcList = _cclist; mailTask.BccList = _bcclist; mailTask.Attachments = _attachments; mailTask.Files = _files; mailTask.Execute(); } catch (Exception e) { Assertion.Assert(_subject + ": " + e.Message, false); } }
public void testAllLists() { MailTask mailTask = new MailTask(); mailTask.Project = new Project(); _tolist = _emailAddress1; _cclist = _emailAddress2; _bcclist = _emailAddress1; _subject = "Msg 5: Test to all addresses"; _message = "Test message"; try { mailTask.Mailhost = _mailhost; mailTask.From = _from; mailTask.ToList = _tolist; mailTask.Subject = _subject; mailTask.Message = _message; mailTask.CcList = _cclist; mailTask.BccList = _bcclist; mailTask.Attachments = _attachments; mailTask.Files = _files; mailTask.Execute(); } catch (Exception e) { Assertion.Assert(_subject + ": " + e.Message, false); } }