Search The ForumSearch   RegisterRegister  LoginLogin

MailBee.NET SMTP

 AfterLogic Forum : MailBee.NET SMTP
Subject Topic: Gmail Send Error Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
Dandi18
Newbie
Newbie
Avatar

Joined: 08 October 2008
Location: Israel
Online Status: Offline
Posts: 4
Posted: 27 October 2010 at 7:18am | IP Logged Quote Dandi18

Hi,
if you can tell me what am i doing wrong (didnt use this component 2 years)

i get a timeout error
Code:

        Dim mailer As New Smtp
        Dim server As SmtpServer = New SmtpServer("smtp.gmail.com", "XXX@Gmail.com", "XXX")
        server.SslMode = SslStartupMode.UseStartTls
        server.SslProtocol = MailBee.Security.SecurityProtocol.Auto
        server.AuthMethods = AuthenticationMethods.Auto
        server.Port = 465
        mailer.SmtpServers.Add(server)
        mailer.From.Email = "xxx@Gmail.com"
        mailer.To.Add("xxx@gmail.com")
        mailer.Subject = "Report"
        mailer.BodyPlainText = "The report contents"

        mailer.Log.Enabled = True
        mailer.Log.Filename = Application.StartupPath & "\log.txt"

        mailer.Send()


Log:

[16:09:36.05] [INFO] Assembly version: 3.1.2.90.
[16:09:36.05] [INFO] Will send mail message.
[16:09:36.14] [INFO] Will resolve host "smtp.gmail.com".
[16:09:36.18] [INFO] Host "smtp.gmail.com" resolved to IP address(es) 74.125.39.109.
[16:09:36.18] [INFO] Will connect to host "smtp.gmail.com" on port 465.
[16:09:36.27] [INFO] Socket connected to IP address 74.125.39.109 on port 465.
[16:09:56.85] [INFO] Will disconnect from host "smtp.gmail.com".
[16:09:56.85] [INFO] Disconnected from host "smtp.gmail.com".
[16:09:56.85] [INFO] Error: Socket connection has timed out. InnerException message follows: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond


Back to Top View Dandi18's Profile Search for other posts by Dandi18
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6104
Posted: 27 October 2010 at 7:29am | IP Logged Quote Igor

UseStartTls option assumes you're using regular port and not dedicated one; although, port 587 might work in such case. Just omit that Port line and see if it works.

We have a tutorial on sending mails via GMail SMTP.

BTW, you're using VERY outdated build, upgrading is highly recommended.

--
Regards,
Igor, AfterLogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 
Dandi18
Newbie
Newbie
Avatar

Joined: 08 October 2008
Location: Israel
Online Status: Offline
Posts: 4
Posted: 28 October 2010 at 1:04am | IP Logged Quote Dandi18

Thanks alot for the quick reply
changed it to port 587 and it works fine

Back to Top View Dandi18's Profile Search for other posts by Dandi18
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide