/// <summary> /// Pravi poruku, adresira, kaci attachmente /// </summary> /// <param name="attachments">attachmenti koji treba da se okace</param> /// <returns>formiran MailMessage objekat - spreman za slanje</returns> public MailMessage createMailObject(reportIncludeFileCollection attachments = null) { MailMessage output = new MailMessage(message.from, message.address, message.subject, message.content); if (attachments != null) { foreach (System.Collections.Generic.KeyValuePair <string, reportIncludeFile> file in attachments) { Attachment attachment = new Attachment(file.Value.sourceFilePath); output.Attachments.Add(attachment); } } return(output); }
/// <summary> /// Pravi poruku, adresira, kaci attachmente /// </summary> /// <param name="attachments">attachmenti koji treba da se okace</param> /// <returns>formiran MailMessage objekat - spreman za slanje</returns> public MailMessage createMailObject(reportIncludeFileCollection attachments = null) { MailMessage output = new MailMessage(message.from, message.address, message.subject, message.content); if (attachments != null) { throw new NotImplementedException(); //foreach (reportIncludeFile file in attachments) //{ // Attachment attachment = new Attachment(file.sourceFilePath); // output.Attachments.Add(attachment); //} } return(output); }