Sending email via VB6

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jacques St-Pierre

    Sending email via VB6

    Hello,

    I need a simple way to send very simple email via a VB6 code. Anyone know
    how to do that? Any code avaliable? Without using Outlook if possible, I
    only have Outlook Express avaliable.

    Bye
    Jacques



  • Beowulf

    #2
    Re: Sending email via VB6

    Jacques St-Pierre wrote:[color=blue]
    > Hello,
    >
    > I need a simple way to send very simple email via a VB6 code. Anyone know
    > how to do that? Any code avaliable? Without using Outlook if possible, I
    > only have Outlook Express avaliable.[/color]

    You'll want to look into VB6's "Microsoft MAPI Controls 6.0" and the
    "Simple MAPI" version of the Windows Mail API (MAPI), which is what
    Outlook Express provides you. In my experience sending mail through
    MAPI isn't simple, but it'll work with OE.

    This link has some good introductory information:

    Comment

    • Jay Taplin

      #3
      Re: Sending email via VB6

      Here is a solution for you:



      I really like this. It uses the WinSock control, rather than CDO/MAPI which
      requires Outlook.

      Jay Taplin


      Comment

      • Michael D. Ober

        #4
        Re: Sending email via VB6


        Take a look at CDOSYS.

        Mike.

        "Jacques St-Pierre" <multelec@globe trotter.net> wrote in message
        news:akzxf.7864 4$OU5.70730@clg rps13...[color=blue]
        >
        > Hello,
        >
        > I need a simple way to send very simple email via a VB6 code. Anyone know
        > how to do that? Any code avaliable? Without using Outlook if possible, I
        > only have Outlook Express avaliable.
        >
        > Bye
        > Jacques
        >
        >
        >
        >[/color]



        Comment

        • Michael D. Ober

          #5
          Re: Sending email via VB6


          CDOSYS doesn't require MAPI, which it sounds like you wish to avoid. It's
          also on every Windows 2000 and later system, both server and workstation.

          Mike.

          "Michael D. Ober" <obermd.@.alum. mit.edu.nospam> wrote in message
          news:nUkyf.2842 $ee6.491@newsre ad3.news.pas.ea rthlink.net...[color=blue]
          >
          >
          > Take a look at CDOSYS.
          >
          > Mike.
          >
          > "Jacques St-Pierre" <multelec@globe trotter.net> wrote in message
          > news:akzxf.7864 4$OU5.70730@clg rps13...[color=green]
          > >
          > > Hello,
          > >
          > > I need a simple way to send very simple email via a VB6 code. Anyone[/color][/color]
          know[color=blue][color=green]
          > > how to do that? Any code avaliable? Without using Outlook if possible, I
          > > only have Outlook Express avaliable.
          > >
          > > Bye
          > > Jacques
          > >
          > >
          > >
          > >[/color]
          >
          >
          >
          >[/color]



          Comment

          • shirish_fortunes
            New Member
            • Feb 2006
            • 2

            #6
            Auto Send software

            [QUOTE=Jacques St-Pierre]Hello,

            I am working on a vb6 application and in that if any error then a window or form show open with the error description and a send button.
            So when user click on send button that details should be send to us through email.

            So I want to send a email thorugh using vb6 and i also want that user should only clicks on send and it sends the email to us without doing any other thing
            by the user.

            Comment

            • shirish_fortunes
              New Member
              • Feb 2006
              • 2

              #7
              I am working on a vb6 application and in that if any error then a window or form show open with the error description and a send button.
              So when user click on send button that details should be send to us through email.

              So I want to send a email thorugh using vb6 and i also want that user should only clicks on send and it sends the email to us without doing any other thing
              by the user.

              Comment

              • Richard Klein

                #8
                Re: Sending email via VB6

                Try this:

                MAPISession1.Si gnOn
                MAPIMessages1.S essionID = MAPISession1.Se ssionID
                'Compose new message
                MAPIMessages1.C ompose
                'Address message
                MAPIMessages1.R ecipDisplayName = "George Bush"
                MAPIMessages1.R ecipAddress = george@whitehou se.gov
                ' Resolve recipient name
                MAPIMessages1.A ddressResolveUI = True
                MAPIMessages1.R esolveName
                'Create the message
                MAPIMessages1.M sgSubject = "I Love ya"
                MAPIMessages1.M sgNoteText = "Hey Bubba"
                'Add attachment
                MAPIMessages1.A ttachmentPathNa me = "c:\zxcvzxcv.zi p"
                'Send the message
                MAPIMessages1.S end False
                MAPISession1.Si gnOff

                "Jacques St-Pierre" <multelec@globe trotter.net> wrote in message
                news:akzxf.7864 4$OU5.70730@clg rps13...[color=blue]
                > Hello,
                >
                > I need a simple way to send very simple email via a VB6 code. Anyone know
                > how to do that? Any code avaliable? Without using Outlook if possible, I
                > only have Outlook Express avaliable.
                >
                > Bye
                > Jacques
                >
                >
                >[/color]


                Comment

                Working...