Archived Forum Post

Index of archived forum posts

Question:

Mail Activex stops function in a VirtualMachine

Jul 12 '14 at 17:46

Suddenly a normal vb6 project that uses the mail activex stops function.

Last Error;

 
ChilkatLog:
  SendEmail:
    DllDate: Oct 17 2009
    UnlockPrefix: UOLCOMMAILQ
    Username: rogerio
    Component: ActiveX
    Recipients:
      NumTo: 1
      To: email@email 'edited
      NumCC: 1
      CC: email1@email 'edited
      NumBCC: 0
    Need new SMTP connection
    SMTP_Connect:
      Connecting to SMTP server smtp.dominio:587 'edited
      smtp_host: smtp.dominio  'edited
      smtp_port: 587
      smtp_user: xxxxxxxxxxx 'edited
      auth-method: 1
      Failed to connect to SMTP server.
    Failed to connect to SMTP server.

Any Guess???


Answer

You're using a really old version of the library - I recommend downloading the latest version and then seeing if the problem persists (maybe there was some server-side change that the old library is incompatible with).

The error just indicates that the connection failed though - are you sure the VM has internet access? Can you ping the SMTP server from the command line, or connect to it via telnet?


Answer

Ok jpbro

I can access internet with the VM and I can ping the SMTP server from the command line.

I Will download the newest library and try again. But I think that the problem maybe of another kind of stuff, because other program made in VB6 that uses this same library functions normally in other VM. Thank You Rogério


Answer

New Library new last error:

 
ChilkatLog:
  SendEmail:
    DllDate: Jun 10 2014
    ChilkatVersion: 9.5.0.40
    UnlockPrefix: UOLCOMMAILQ
    Username: xxxxxxxx ''edited
    Architecture: Little Endian; 32-bit
    Language: ActiveX
    VerboseLogging: 0
    recipients:
      TO: email@email 'edited
      CC: email1@email 'edited
      totalCount: 2
    --recipients
    renderToMime:
      createEmailForSending:
        xSigningAlg: sha1
        Auto-generating Message-ID
      --createEmailForSending
      renderToMime: Elapsed time: 0 millisec
    --renderToMime
    progressTotal: 733
    smtpConnect:
      SmtpHost: smtp.xxxxxxx 'edited
      SmtpPort: 587
      SmtpUsername: xxxxxxxx 'edited
      SmtpSsl: 0
      StartTLS: 0
      SmtpAuthMethod: 1
      SmtpConnect:
        Need new SMTP connection
        checkForExistingConnection: Elapsed time: 0 millisec
        Connecting to SMTP server smtp.xxxxxxxxx:587 'edited
        smtp_host: smtp.xxxxxxxxx 'edited
        smtp_port: 587
        smtp_user: xxxxxxxx ;edited
        auth-method: 1
        socket2Connect:
          connect2:
            connectSocket:
              connect_ipv6_or_ipv4:
                resolveHostname6:
                  getAddressInfo:
                    Failed to get host address info. (3)
                    SocketError: WSAHOST_NOT_FOUND No such host is known.
                    hostOrIpAddr: smtp.xxxxxxx 'edited
                    port: 587
                    Versions of Windows earlier than Windows XP are limited to handling IPv4 only
                    On Windows Server 2003 and Windows XP, IPv6 addresses are returned only if IPv6 is installed on the local computer.
                  --getAddressInfo
                --resolveHostname6
                Domain to IP address resolution failed.
              --connect_ipv6_or_ipv4
            --connectSocket
            ConnectFailReason: DNS lookup failed
          --connect2
        --socket2Connect
        Failed to connect to SMTP server.
      --SmtpConnect
      checkOrMakeSmtpConnection: Elapsed time: 15021 millisec
    --smtpConnect
    Failed.
  --SendEmail
--ChilkatLog


Answer

The DNS lookup is failing - are you sure that you have the correct SMTP server address (e.g. smtp.myserver.com)? It looks like you've just got smtp.xxxx, not smtp.xxxx.xxx, which might be the problem.


Answer

Hello jpbro!

The smtp server is correct i can ping then! The IDE is crashing with the new activex library. Rogerio


Answer

I'm also using VB6 in a VM (WinXP SP3), and I'm neither getting a crash in the IDE, nor any problem connecting to my SMTP server and sending an e-mail message.

Here's the test code that I am trying:

Private Sub Command1_Click()
   Dim lo_MailMan As New Chilkat_v9_5_0.ChilkatMailMan
   Dim lo_Email As New Chilkat_v9_5_0.ChilkatEmail

With lo_Email
      .AddTo "Somebody", "somebody@somewhere.com"
      .subject = "Test"
      .Body = "Test"
      .FromAddress = "me@myhost.com"
   End With

With lo_MailMan
      .AutoFix = 0
      .SmtpHost = "smtp.myhost.com"
      .SmtpPort = 465
      .SmtpSsl = 1
      .SmtpUsername = "**SMTP_USERNAME**"
      .SmtpPassword = "**SMTP_PASSWORD**"

.UnlockComponent "***UNLOCK CODE***"
      If .SendEmail(lo_Email) <> 1 Then
         Debug.Assert False
         Debug.Print x.LastErrorText
      End If
   End With
End Sub

Does that crash your IDE? If not, can you post a small code sample that will crash the IDE?


Answer

Hi I tried your code sample and i could not send an email. The last error was the same as before. when i clicked the command button1 again the IDE chash. Rogerio

OBS. The command line ping is experience some kind of trouble. some time it resolves the DNS others not.


Answer

Unfortunately I can't reproduce the problem, so I'm not sure I can be much more help. I've tried sending multiple e-mails, and this is not crashing my IDE.

One thought - if you are using VirtualBox for your VM, did you upgrade to the latest version recently? If so, did you also update and re-install your Vbox Guest Extensions? I've experienced network issues before when the installed guest extension version was not in-sync with VBox itself.


Answer

Also, The WSAHOST_NOT_FOUND No such host is known error does indicate a DNS lookup problem. My suspicion is that there is something wrong with your network configuration that is preventing the lookup from succeeding (or the SMTP host name is possibly mis-spelled?)

See: http://support.ipswitch.com/kb/WSK-19980714-EM36.htm


Answer

I will download the latest version of virtualbox and Guess additions. I tried to turnoff the firewall without success. The smtp server name is correct Maybe is some wrong in network configurations that is preventing the lookup from succeeding. I don't know how to verify this but i will look at google. Thank you so much for your help!!!!