Results 1 to 6 of 6

Thread: Email in VB??? Adding message text and attaching files

  1. #1

    Thread Starter
    PowerPoster 2.0 Negative0's Avatar
    Join Date
    Jun 2000
    Location
    Southeastern MI
    Posts
    4,367

    Question

    Does anyone know how to attach a file and set the message text through the ShellExecute command. This is the Code I have so far:

    Code:
    Success = ShellExecute(0&, vbNullString, _ 
    "mailto:[email protected]?subject=Subject Goes Here", _
     vbNullString, "C:\", SW_SHOWNORMAL)
    This command works fine, but I cant figure out what
    parameters will set the message text and attachmet files.

    Also is there a way to automate this so the user does not
    see the default email client, it just sends the message out

    Thanks in advance

  2. #2
    Frenzied Member Buzby's Avatar
    Join Date
    Jan 1999
    Location
    UK
    Posts
    1,670
    Go to http://www.planetsource.com/vb and search for BuzMail - this is my e-mail object that will make your life easier.. you can attach files as you feel fit and send e-mails out - all without the user seeing the client.
    And don't forget to rate the code as Excellent!!
    'Buzby'
    Visual Basic Developer
    "I'm moving to Theory. Everything works there."

  3. #3

    Thread Starter
    PowerPoster 2.0 Negative0's Avatar
    Join Date
    Jun 2000
    Location
    Southeastern MI
    Posts
    4,367
    Buzby,

    Thanks, but that link did not work. It looks like
    planetsource is down.

  4. #4
    Frenzied Member Buzby's Avatar
    Join Date
    Jan 1999
    Location
    UK
    Posts
    1,670
    I've e-mailed both of you a copy of the files. Please let me know how you get on. (and rate it as EXCELLENT(!) on PlanetSourceCode!)

    As far as I can tell

    http://www.PlanetSourceCode.com/vb

    should work..?!

    Oh well.

    'Buzby'
    Visual Basic Developer
    "I'm moving to Theory. Everything works there."

  5. #5
    Addicted Member
    Join Date
    Apr 2000
    Location
    Sheffield, England.
    Posts
    136
    That URL DOES work. But it's different to the one you gave before.


  6. #6
    Frenzied Member Buzby's Avatar
    Join Date
    Jan 1999
    Location
    UK
    Posts
    1,670
    Oops - you're right - I missed the 'Code' part..

    Sorry folks!


    PS - LAURENS - I sent the file to your e-mail account but your over-excitable e-mail server told me it had VB script in it (suprise, suprise) and it blocked it (obviously a little bit scared of viruses and such like).
    So you'll have to go to PlanetSourceCode..


    'Buzby'
    Visual Basic Developer
    "I'm moving to Theory. Everything works there."

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