Dim url As String = "https://.../ews/Exchange.asmx" exch.Url = New System.Uri(url) exch.UseDefaultCredentials = False exch.Credentials = New System.Net.NetworkCredential(TextBox2.Text, TextBox1.Text) ' exch.AutodiscoverUrl("myemail") 'exch.ResolveName("", ResolveNameSearchLocation.ContactsThenDirectory, True) Dim message As New EmailMessage(exch) message.Subject = "Новое заявление - " & ComboBox1.SelectedItem message.Body = "Добрый день!" & vbNewLine & vbNewLine & "Прошу обработать заявление - " & ComboBox1.SelectedItem For Each f In attfiles message.Attachments.AddFileAttachment(f) Next message.ToRecipients.Add(email) message.SendAndSaveCopy()
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)