private void button4_Click(object sender, RoutedEventArgs e) { Microsoft.Win32.OpenFileDialog filedialog = new Microsoft.Win32.OpenFileDialog(); filedialog.Filter = "Zip Files|*.zip"; if (flag == 0) { bool b = (bool)filedialog.ShowDialog(); if (b == true) { attach.Text = filedialog.FileName+";"; } flag++; } else { TextBox vv = new TextBox(); bool b = (bool)filedialog.ShowDialog(); if (b == true) { attach.Text += filedialog.FileName + ";"; } } }
foreach (string m in attach.text.Split(';')) { mail.Attachments.Add(new Attachment(m)); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)