VB & Access Send Email

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ttamilvanan81
    New Member
    • Mar 2007
    • 35

    #1

    VB & Access Send Email

    Hai,
    I need to send and receive Email's using VB and Ms-Access. Am using the following code. If i run this code, i has the error message as,

    Compile Error
    User-defined type not defined in the code for New clsSendMail

    Private Sub Command0_Click( )
    Set poSendMail = New clsSendMail
    poSendMail.UseA uthentication = True
    poSendMail.UseP opAuthenticatio n = True
    poSendMail.POP3 Host = "pop.gmail. com"
    poSendMail.User Name = "ttamilvana n81"
    poSendMail.Pass word = "classic"
    poSendMail.SMTP Host = smtp.gmail.com
    poSendMail.SMTP Port = 465
    poSendMail.from = "ttamilvanan81@ gmail.com"
    poSendMail.From DisplayName = Tamilvanan
    poSendMail.Reci pient = "ephrontamizhva nan@gmail.com"
    poSendMail.Reci pientDisplayNam e = "EphronTamilvan an"
    poSendMail.Repl yToAddress = "ttamilvanan81@ gmail.com"
    poSendMail.Subj ect = "Test Mail for How to Send E-Mail"
    poSendMail.Mess age = "This is a test"
    poSendMail.send
    End Sub

    If anyone know how to run this code, if any components or tools can i installed?

    if anyone knows, please let me know.

    By
    Tamilvanan
  • vijaydiwakar
    Contributor
    • Feb 2007
    • 579

    #2
    Originally posted by ttamilvanan81
    Hai,
    I need to send and receive Email's using VB and Ms-Access. Am using the following code. If i run this code, i has the error message as,

    Compile Error
    User-defined type not defined in the code for New clsSendMail

    Private Sub Command0_Click( )
    Set poSendMail = New clsSendMail
    poSendMail.UseA uthentication = True
    poSendMail.UseP opAuthenticatio n = True
    poSendMail.POP3 Host = "pop.gmail. com"
    poSendMail.User Name = "ttamilvana n81"
    poSendMail.Pass word = "classic"
    poSendMail.SMTP Host = smtp.gmail.com
    poSendMail.SMTP Port = 465
    poSendMail.from = "ttamilvanan81@ gmail.com"
    poSendMail.From DisplayName = Tamilvanan
    poSendMail.Reci pient = "ephrontamizhva nan@gmail.com"
    poSendMail.Reci pientDisplayNam e = "EphronTamilvan an"
    poSendMail.Repl yToAddress = "ttamilvanan81@ gmail.com"
    poSendMail.Subj ect = "Test Mail for How to Send E-Mail"
    poSendMail.Mess age = "This is a test"
    poSendMail.send
    End Sub

    If anyone know how to run this code, if any components or tools can i installed?

    if anyone knows, please let me know.

    By
    Tamilvanan
    If u've received this code from some where else then ask for the class module named clsSendMail
    ur project don't have this module simply place this module and run the code

    Comment

    • ttamilvanan81
      New Member
      • Mar 2007
      • 35

      #3
      Originally posted by vijaydiwakar
      If u've received this code from some where else then ask for the class module named clsSendMail
      ur project don't have this module simply place this module and run the code
      Hai,
      You are Right, iam get this code from another person. But i don't receive any class module named clsSendMail. So thats why i am asking this.

      Kindly, if you know this, please let me know....

      Thanks

      Tamilvanan

      Comment

      • vijaydiwakar
        Contributor
        • Feb 2007
        • 579

        #4
        Originally posted by ttamilvanan81
        Hai,
        You are Right, iam get this code from another person. But i don't receive any class module named clsSendMail. So thats why i am asking this.

        Kindly, if you know this, please let me know....

        Thanks

        Tamilvanan
        how could i no what he had coaded for that module

        Comment

        • ttamilvanan81
          New Member
          • Mar 2007
          • 35

          #5
          Originally posted by vijaydiwakar
          how could i no what he had coaded for that module
          Hai,
          I am sending mail using your code as your earlier post. But i can't got the clsSendMail class module. Can you please send me that class module.

          and i need to attach the file in mail. So if you can know, how the attachments will be working, kindly post me the details.

          Is this code need any ActiveX control or components, please let me know that details also.



          Thank,
          By
          Tamilvanan

          Comment

          • ttamilvanan81
            New Member
            • Mar 2007
            • 35

            #6
            Originally posted by vijaydiwakar
            how could i no what he had coaded for that module
            Thank you very much.
            If you know how to attach the file like, click the browse button and select any one file to attached in email.

            If you know how to attach file in the above format, kindly let me know.

            Thanks

            Tamilvanan

            Comment

            • vijaydiwakar
              Contributor
              • Feb 2007
              • 579

              #7
              Originally posted by ttamilvanan81
              Thank you very much.
              If you know how to attach the file like, click the browse button and select any one file to attached in email.

              If you know how to attach file in the above format, kindly let me know.

              Thanks

              Tamilvanan
              i think i've just posted the code for that

              Comment

              Working...