Vb.net 在带有CDO的VB中使用Amazon SES发送-无法发送

Vb.net 在带有CDO的VB中使用Amazon SES发送-无法发送,vb.net,smtp,amazon-ses,Vb.net,Smtp,Amazon Ses,在带有CDO的VB中使用Amazon SES发送-无法发送: 我们已经尝试使用端口587与SSL-没有运气 我们已经尝试使用端口465与SSL-没有运气 我们尝试过在没有SSL的情况下使用端口587-没有运气 我们已经尝试使用端口25-530验证所需密码是否存在且有效 知道我们做错了什么吗 Call SendEmail Sub SendEmail() Const cdoSendUsingPort = 2 'Send the message using th

在带有CDO的VB中使用Amazon SES发送-无法发送:

我们已经尝试使用端口587与SSL-没有运气 我们已经尝试使用端口465与SSL-没有运气 我们尝试过在没有SSL的情况下使用端口587-没有运气 我们已经尝试使用端口25-530验证所需密码是否存在且有效 知道我们做错了什么吗

Call SendEmail 

Sub SendEmail()

  Const cdoSendUsingPort                = 2 'Send the message using the network (SMTP over the network).
  Const cdoReturnReceiptTo              = "urn:schemas:mailheader:return-receipt-to"
  Const cdoBasic                        = 1 'basic (clear-text) authentication

  On Error Resume Next

  Dim objFSO, objTextFile
  Set objFSO      = CreateObject("Scripting.FileSystemObject")
  Set objTextFile = objFSO.CreateTextFile("c:\temp\Emails\RS_15031605_XENCO2_20150323_163107.log", True)

  Set objMessage                        = CreateObject("CDO.Message") 
  If  err.Number <> 0 Then
      objTextFile.WriteLine("[result=-1](" & err.Description & ")")
      objTextFile.Close
      Exit Sub
  End If

  objMessage.Subject                    = "test message"
  objMessage.From                       = """LIMS Administrator"" <reporting@clientdomain.com> "
  objMessage.ReplyTo                    = "Client name <reporting@clientdomain.com>"
  objMessage.Fields(cdoReturnReceiptTo) = "Client name <reporting@clientdomain.com>"
  objMessage.Fields.Update 
  objMessage.To                         = "email@domain.com"
  objMessage.CC                         = "email@domain.com"
  objMessage.TextBody                   = "Test"

  objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing")             = cdoSendUsingPort
  objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver")            = "email-smtp.us-east-1.amazonaws.com"
  objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate")      = cdoBasic
  objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername")          = "VALIDAMAZONSESUSERNAMELOOKSLIKETHIS->ygyg66Ygyg987g8yg987g"
  objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword")          = "*******VALIDAMAZONSESPASSWORDHERE**************"
  objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport")        = 25
  objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl")            = False
  objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
  objMessage.Configuration.Fields.Update

  objMessage.Send
  If  err.Number <> 0 Then
      objTextFile.WriteLine("[result=-2](" & err.Description & ")")
      objTextFile.Close
      Exit Sub
  End If

  objTextFile.WriteLine("[result=0]()")
  objTextFile.Close
End Sub

您是否已将密码转换为SMTP密码?此链接特定于Linux,但您应该了解:您是否试图强制SES使用不同的默认端口发送电子邮件?我们尚未将密码转换为SMTP密码。我认为这是有用的,因为他们提供给我们。是否有一个web表单可以做到这一点?问:您是否试图强制SES使用不同的默认端口发送电子邮件?答:我们试过25号、465号和587号端口,但都没有成功。