Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
GMail blues
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Versions des environnements
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows NT
Database:
Jet/Access Engine
Application:
Desktop
Divers
Thread ID:
01570810
Message ID:
01570852
Vues:
40
Tracert only lets you know if there is an open route to the destination address.

It is far more likely that something (firewall or router) is blocking port 465 which is the default GMail SMTP port.

>Thanks. It does not seem to be the ip of the firewall.
>
>>From Windows command prompt:
>>
>>TRACERT www.gmail.com
>>
>>Look at the output to determine where the route fails. If it's the ip address of the firewall, you know that's your problem.
>>
>>>This code works on all the sites where I have installed it, except in some. The client.send() just fails. I guess this is firewall issue. I there anyway one can figure out why the client.send fails?
>>>
>>>Thanks (Sergey :) ).
>>>
>>>
>>>
>>>    Public Sub SendEmail(ByVal subject As String, ByVal messageBody As String, _
>>>     ByVal fromAddress As String, ByVal toAddress As String, ByVal ccAddress As String)
>>>
>>>        Dim message As New MailMessage()
>>>        Dim client As New SmtpClient()
>>>
>>>        'Set the sender's address
>>>        message.From = New MailAddress(fromAddress)
>>>        'Allow multiple "To" addresses to be separated by a semi-colon
>>>        If (toAddress.Trim.Length > 0) Then
>>>            For Each addr As String In toAddress.Split(";"c)
>>>                message.To.Add(New MailAddress(addr))
>>>            Next
>>>        End If
>>>
>>>        'Allow multiple "Cc" addresses to be separated by a semi-colon
>>>        If (ccAddress.Trim.Length > 0) Then
>>>            For Each addr As String In ccAddress.Split(";"c)
>>>                message.CC.Add(New MailAddress(addr))
>>>            Next
>>>        End If
>>>        'Set the subject and message body text
>>>        message.Subject = subject
>>>        message.IsBodyHtml = False
>>>        message.Body = messageBody
>>>
>>>        client.Host = "smtp.gMAIL.com"
>>>        client.Credentials = New System.Net.NetworkCredential("***@gmail.com", "***")
>>>        'client.Port = 587
>>>        client.Port = 465
>>>        client.EnableSsl = True
>>>        'Send the e-mail message
>>>        Dim l As Boolean = False
>>>        Try
>>>            client.Send(message)
>>>        Catch
>>>            l = True
>>>        End Try
>>>        If l Then
>>>            MsgBox("Send failure")
>>>        Else
>>>            MsgBox("OK")
>>>        End If
>>>    End Sub
>>>
____________________________________

Don't Tread on Me

Overthrow the federal government NOW!
____________________________________
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform