i have below code to send email in outlook 2013
Try
Dim SmtpServer As New SmtpClient()
Dim mail As New MailMessage()
SmtpServer.Credentials = New Net.NetworkCredential(OutlookID, OutlookPassword)
SmtpServer.Port = ***
SmtpServer.Host = "smtp.office365.com"
SmtpServer.EnableSsl = True
mail = New MailMessage()
mail.From = New MailAddress(OutlookID)
mail.To.Add(TbxTo.Text)
mail.Subject = TbxSubject.Text
mail.Body = TbxBody.Text
SmtpServer.Send(mail)
MsgBox("mail sent")
Catch ex As Exception
MsgBox(ex.ToString)
End Try
i want to save the sent mail in sent folder. But not getting correct code for saving item in sent folder.
Thanks