public void Add(string address, string displayName, MapiMailMessage.RecipientType recipientType) { this.Add(new Recipient(address, displayName, recipientType)); }
private void sendFeedbackToolStripMenuItem_Click(object sender, EventArgs e) { try { MapiMailMessage message = new MapiMailMessage("WDS feedback", "Insert your text here please...", new MAPIResultDelegate(MAPIResult)); message.Recipients.Add("[email protected] "); string currentDirectory = Directory.GetCurrentDirectory(); try { string path = Path.Combine(Application.LocalUserAppDataPath, "actualWDSLog.rtf"); File.WriteAllText(path, GlobalServices.LogContext); message.Files.Add(path); } catch (Exception exception) { MessageBox.Show(exception.Message, "Can't add attachment", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } message.ShowDialog(); Directory.SetCurrentDirectory(currentDirectory); } catch (Exception exception2) { MessageBox.Show(exception2.Message, "Cannot send email", MessageBoxButtons.OK, MessageBoxIcon.Hand); } }
public void Add(string address, MapiMailMessage.RecipientType recipientType) { this.Add(new Recipient(address, recipientType)); }