Results 1 to 25 of 25

Thread: How can I send automatic e-mails with VB6?

Hybrid View

  1. #1
    New Member
    Join Date
    Sep 2007
    Posts
    5

    Re: How can I send automatic e-mails with VB6?

    i tried the link that you provided...

    but was not successfull in running the code, i've encountered an error stating:

    "Run-time error '40006':
    Wrong protocol or connection state for the requested transaction or request"

    why is it like that?
    but i can send email using OUTLOOK, using the same SMTP host name...

    please help...

  2. #2
    Hyperactive Member tommygrayson's Avatar
    Join Date
    Aug 2005
    Location
    In my Nissan Silvia
    Posts
    433

    Re: How can I send automatic e-mails with VB6?

    Use Microsoft CDO. It will not prompt a messagebox if you are sending e-mails.

    Rate Me! Rate Me! Rate Me!

    Time to fly.

    Copyright GraysonSoft Inc. 2007

  3. #3
    New Member
    Join Date
    Sep 2007
    Posts
    5

    Re: How can I send automatic e-mails with VB6?

    hey tommy,

    can you spare some codes with it?

    thanks

  4. #4
    Hyperactive Member tommygrayson's Avatar
    Join Date
    Aug 2005
    Location
    In my Nissan Silvia
    Posts
    433

    Re: How can I send automatic e-mails with VB6?

    Quote Originally Posted by toto_phl
    hey tommy,

    can you spare some codes with it?

    thanks
    Have you already included the Microsoft CDO Library in your Library?

    If so then hmmm........

    Let me seeee........

    Dang. It has been a long time since I programmed with VB 6 that I almost forgot to use CDO in VB6.

    Anyway, click on this link
    Last edited by tommygrayson; Sep 14th, 2007 at 03:03 AM. Reason: Corrected posting of link.
    Rate Me! Rate Me! Rate Me!

    Time to fly.

    Copyright GraysonSoft Inc. 2007

  5. #5
    New Member
    Join Date
    Sep 2007
    Posts
    5

    Re: How can I send automatic e-mails with VB6?

    i already added CDO in the reference...

    got the source code from the link you provided...

    but the part where it states the:

    objMessage.Configuration.Fields.Item _
    ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = ""

    it said that it should use the IP address, i dunno the IP. i only know the host name...

    is it the same?


  6. #6
    Frenzied Member
    Join Date
    Aug 2000
    Location
    O!
    Posts
    1,177

    Re: How can I send automatic e-mails with VB6?

    Quote Originally Posted by toto_phl
    i tried the link that you provided...

    but was not successfull in running the code, i've encountered an error stating:

    "Run-time error '40006':
    Wrong protocol or connection state for the requested transaction or request"

    why is it like that?
    but i can send email using OUTLOOK, using the same SMTP host name...

    please help...
    I can't help you until I get some more information.

    Did you make any changes other than filling in the 3 pieces of information that the program needs? These would be in the lines:
    Code:
      sckMail.RemoteHost = "smtp server address goes here"  ' supply server address
    
      addyList = "address1@domain1;address1@domain2"        ' supply address list (1 or more)
    
                sckMail.SendData "MAIL FROM:<sender@domain>" & vbCrLf  ' supply sender@domain
    Where in the code is the error occurring? What have you done up to that point?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width