Ich hogffe ich bin hier im Richtigen Forum, ansonsten bitte verschieben.
Ich habe eine Funktion, die mir ohne Rückfrage eine E-Mail über Outlook versendent, das tut soweit.
Funktion :
C#-Quelltext
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25:
| public static void OutlookEmailVersenden(string Empfängeradresse, string Header, string Body, List<string> Anhänge = null, string cc = "") { try { Microsoft.Office.Interop.Outlook.Application outlook = new Microsoft.Office.Interop.Outlook.Application(); _MailItem _mail = (_MailItem)outlook.CreateItem(OlItemType.olMailItem); _mail.To = Empfängeradresse; _mail.Subject = Header; _mail.Body = Body; if (Anhänge != null) { foreach (string _anh in Anhänge) { _mail.Attachments.Add(_anh); } } _mail.BodyFormat = OlBodyFormat.olFormatHTML; if (cc != "") _mail.CC = cc; _mail.Send(); } catch { throw; } } |
Nun möchte ich dem Anwender in einer 2. Funktion Outlook öffnen und eine Neue E-Mail anlegen mit Anhang, aber noch nicht senden und auch noch keinen Empfänger eintragen. So wie wenn ich in Windows-Explorer Rechtsklick auf einen Datei und senden an E-Mail Empfänger sage.
Wie mache ich das??
Vielen Dank
Timo