Author |
|
jvinis Newbie
Joined: 20 May 2008
Online Status: Offline Posts: 18
|
Posted: 12 June 2008 at 2:53am | IP Logged
|
|
|
With this working Code
Dim srv As SmtpServer = New SmtpServer()
srv.Name = "smtp.gmail.com"
srv.Port = 465
srv.AccountName = xxxxxxxx@gmail.com
srv.Password = xxxxxxxx
Dim mailer As Smtp = New Smtp()
srv.SslProtocol = SecurityProtocol.Auto
srv.AuthMethods = AuthenticationMethods.Auto
srv.SslMode = SslStartupMode.OnConnect
mailer.SmtpServers.Add(Server)
mailer.Connect()
Dim NewMessage As MailMessage
NewMessage = New MailMessage()
NewMessage.LoadMessage( valid Eml Data)
mailer.Message = NewMessage
mailer.Send()
mailer.Disconnect()
Today I have the exception:
MailBee.SmtpMail.MailBeeSmtpRefusedSenderException: The server rejected the specified sender email address. The server responded: 530 5.7.0 Must issue a STARTTLS command first. y37sm1633574iky.8.
at eg.a(MailMessage A_0, String A_1, EmailAddressCollection A_2, DeliveryNotificationOptions A_3, Smtp8bitDataConversion A_4, Boolean A_5, EmailAddressCollection A_6, EmailAddressCollection A_7, Boolean A_8, Boolean A_9, DataTable A_10, Int32 A_11, String A_12)
at eg.a(MailMessage A_0, String A_1, EmailAddressCollection A_2, DeliveryNotificationOptions A_3, Smtp8bitDataConversion A_4, Boolean A_5, SendFailureThreshold A_6, Boolean A_7, DataTable A_8, Int32 A_9, String A_10)
at ep.a(MailMessage A_0, String A_1, EmailAddressCollection A_2, DeliveryNotificationOptions A_3, Smtp8bitDataConversion A_4, Boolean A_5, SendFailureThreshold A_6, Boolean A_7, DataTable A_8, Int32 A_9, String A_10)
at er.a(String A_0, EmailAddressCollection A_1)
at er.a(Boolean A_0, String A_1, EmailAddressCollection A_2)
at MailBee.SmtpMail.Smtp.Send()
at CitronMobile.Components.Mail.Gmail.ClientHandler.SendMail(Xm lDataDocument Request)
Log:
[12:44:25.78] [INFO] Assembly version: 3.1.2.90.
[12:44:25.76] [INFO] Will resolve host "smtp.gmail.com".
[12:44:25.92] [INFO] Host "smtp.gmail.com" resolved to IP address(es) 66.249.91.109.
[12:44:25.92] [INFO] Will connect to host "smtp.gmail.com" on port 25.
[12:44:25.99] [INFO] Socket connected to IP address 66.249.91.109 on port 25.
[12:44:26.09] [RECV] 220 mx.google.com ESMTP y37sm1633574iky.8\r\n
[12:44:26.09] [INFO] Connected to mail service at host "smtp.gmail.com" on port 25 and ready.
[12:44:33.01] [INFO] Will send Hello command (HELO or EHLO).
[12:44:33.01] [SEND] EHLO gmail.com\r\n
[12:44:33.10] [RECV] 250-mx.google.com at your service, [79.130.183.108]\r\n250-SIZE 28311552\r\n250-8BITMIME\r\n250-STARTTLS\r\n250 ENHANCEDSTATUSCODES\r\n
[12:44:33.10] [INFO] SMTP Hello completed.
[12:44:33.10] [INFO] Will send mail message to SMTP server "smtp.gmail.com".
[12:44:33.10] [INFO] Will submit sender and recipients.
[12:44:33.10] [SEND] MAIL FROM:<xxxxxxxxx@gmail.com>\r\n
[12:44:33.20] [RECV] 530 5.7.0 Must issue a STARTTLS command first. y37sm1633574iky.8\r\n
[12:44:33.21] [INFO] Error: The server rejected the specified sender email address. The server responded: 530 5.7.0 Must issue a STARTTLS command first. y37sm1633574iky.8.
[12:44:33.21] [INFO] Will reset SMTP session.
[12:44:33.21] [SEND] RSET\r\n
[12:44:33.31] [RECV] 250 2.1.0 Flushed y37sm1633574iky.8\r\n
[12:44:33.31] [INFO] SMTP session was reset.
Can you help me ?
|
Back to Top |
|
|
Andrew AfterLogic Support
Joined: 28 April 2006 Location: United States
Online Status: Offline Posts: 1189
|
Posted: 12 June 2008 at 4:42am | IP Logged
|
|
|
Although the code you provided states your application connects to port 465, the log file states it connects to port 25. 25 is regular SMTP port and enabling SSL on it requires STARTTLS command, while 465 is a dedicated SSL SMTP port where SSL is enabled on connection stage.
Please recompile your application and try again, the log should contain a record stating it connects to 465 port, not to 25.
Best regards,
Andrew
|
Back to Top |
|
|