嗨,我正在使用以下代码从我的 Windows 基础应用程序发送
Mail.Subject = "test email"
Mail.To.Add("to@xyz.com")
Mail.From = New MailAddress("from@abc.com")
Mail.Body = "Hello"
Dim attachment As System.Net.Mail.Attachment
attachment = New System.Net.Mail.Attachment("AttachPath")
Mail.Attachments.Add(attachment)
Dim SMTP As New SmtpClient("smtp.abc.com")
SMTP.EnableSsl = True
SMTP.Credentials = New System.Net.NetworkCredential("xyz@.abc.com", "password")
SMTP.Port = 25
SMTP.Send(Mail)
但我不想使用
SMTP.Credentials = New System.Net.NetworkCredential("xyz@.abc.com", "password")
还有Interpub
任何人都可以解决这个问题