/// <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> /// Adds a new recipient with the specified address, display name and recipient type to this collection. /// </summary> public void Add(string address, string displayName, MapiMailMessage.RecipientType recipientType) { this.Add(new Recipient(address, displayName, recipientType)); }
/// <summary> /// Adds a new recipient with the specified address and recipient type to this collection. /// </summary> public void Add(string address, MapiMailMessage.RecipientType recipientType) { this.Add(new Recipient(address, recipientType)); }
/// <summary> /// Creates a new recipient with the specified address, display name and recipient type. /// </summary> public Recipient(string address, string displayName, MapiMailMessage.RecipientType recipientType) { Address = address; DisplayName = displayName; RecipientType = recipientType; }
/// <summary> /// Creates a new recipient with the specified address and recipient type. /// </summary> public Recipient(string address, MapiMailMessage.RecipientType recipientType) { Address = address; RecipientType = recipientType; }