Vb.net -- 发送邮件时间段错误,还是成立的

Vb.net - error sending a mail period of time, or established

嘿,我正在尝试在 gmail.com 中使用 vb.net 发送文件,但问题是我收到错误消息 "period of time, or established connection failed because connected host has failed to respond 64.233.166.108:567"

我不确定是什么问题,我在任何地方都找不到答案:(

感谢您的帮助!

代码:

 Using mail As New MailMessage
            mail.From = New MailAddress("....@gmail.com")
            mail.To.Add("........@gmail.com")
            mail.Body = "Computer info Below"
            Path = "C:\Users\" & Environment.UserName & "\Pictures\hello.txt"
            Dim attach As New Attachment(Path)
            mail.Attachments.Add(attach)
            mail.Subject = Environment.UserName
            mail.Priority = mail.Priority.Normal
            Using SMTP As New SmtpClient
                SMTP.EnableSsl = True
                SMTP.Port = "567"
                SMTP.Host = "smtp.gmail.com"
                SMTP.Credentials = New Net.NetworkCredential("....@gmail.com", "******")
                SMTP.Send(mail)
            End Using
        End Using

你确定那个端口吗?给 587 端口一个机会 :) – Jimi

已解决