/// <summary> /// Helper Method for creating an Email with Attachment /// </summary> /// <param name="fullpath">Path to file</param> /// <param name="captureDetails"></param> public static void SendImage(string fullPath, string title) { MapiMailMessage message = new MapiMailMessage(title, null); message.Files.Add(fullPath); message.ShowDialog(); }
/// <summary> /// Helper Method for creating an Email with Attachment /// </summary> /// <param name="fullpath">Path to file</param> /// <param name="captureDetails"></param> public static void SendImage(string fullPath, string title, bool deleteFileOnExit) { MapiMailMessage message = new MapiMailMessage(title, null); message.Files.Add(fullPath); message.ShowDialog(deleteFileOnExit); }
/// <summary> /// Helper Method for creating an Email with Attachment /// </summary> /// <param name="fullPath">Path to file</param> /// <param name="title"></param> public static void SendImage(string fullPath, string title) { using (MapiMailMessage message = new MapiMailMessage(title, null)) { message.Files.Add(fullPath); if (!string.IsNullOrEmpty(conf.MailApiTo)) { message._recipientCollection.Add(new Recipient(conf.MailApiTo, RecipientType.To)); } if (!string.IsNullOrEmpty(conf.MailApiCC)) { message._recipientCollection.Add(new Recipient(conf.MailApiCC, RecipientType.CC)); } if (!string.IsNullOrEmpty(conf.MailApiBCC)) { message._recipientCollection.Add(new Recipient(conf.MailApiBCC, RecipientType.BCC)); } message.ShowDialog(); } }
/// <summary> /// Helper Method for creating an Email with Attachment /// </summary> /// <param name="fullPath">Path to file</param> /// <param name="title"></param> public static void SendImage(string fullPath, string title) { using (MapiMailMessage message = new MapiMailMessage(title, null)) { message.Files.Add(fullPath); if (!string.IsNullOrEmpty(CoreConfig.MailApiTo)) { message.Recipients.Add(new Recipient(CoreConfig.MailApiTo, RecipientType.To)); } if (!string.IsNullOrEmpty(CoreConfig.MailApiCC)) { message.Recipients.Add(new Recipient(CoreConfig.MailApiCC, RecipientType.CC)); } if (!string.IsNullOrEmpty(CoreConfig.MailApiBCC)) { message.Recipients.Add(new Recipient(CoreConfig.MailApiBCC, RecipientType.BCC)); } message.ShowDialog(); } }
/// <summary> /// Helper Method for creating an Email with Attachment /// </summary> /// <param name="fullpath">Path to file</param> /// <param name="captureDetails"></param> public static void SendImage(string fullPath, ICaptureDetails captureDetails) { string title = FilenameHelper.FillPattern(conf.MailApiSubjectPattern, captureDetails, false); MapiMailMessage message = new MapiMailMessage(title, null); message.Files.Add(fullPath); if (!string.IsNullOrEmpty(conf.MailApiTo)) { message._recipientCollection.Add(new Recipient(conf.MailApiTo, RecipientType.To)); } if (!string.IsNullOrEmpty(conf.MailApiCC)) { message._recipientCollection.Add(new Recipient(conf.MailApiCC, RecipientType.CC)); } if (!string.IsNullOrEmpty(conf.MailApiBCC)) { message._recipientCollection.Add(new Recipient(conf.MailApiBCC, RecipientType.BCC)); } message.ShowDialog(); }
/// <summary> /// Helper Method for creating an Email with Attachment /// </summary> /// <param name="fullpath">Path to file</param> /// <param name="captureDetails"></param> public static void SendImage(string fullPath, string title) { MapiMailMessage message = new MapiMailMessage(title, null); message.Files.Add(fullPath); message.ShowDialog(); }
/// <summary> /// Helper Method for creating an Email with Attachment /// </summary> /// <param name="fullpath">Path to file</param> /// <param name="captureDetails"></param> public static void SendImage(string fullPath, string title, bool deleteFileOnExit) { MapiMailMessage message = new MapiMailMessage(title, null); message.Files.Add(fullPath); message.ShowDialog(deleteFileOnExit); }