email + VB6

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Kevin Robinson

    #1

    email + VB6

    Hi,

    I hope someone can help me with an email problem.

    I am able to use ShellExecute to open a default email application and to add
    an atachment to it with the following code:-

    stext = email@example.c om
    aAddedtext = sAddedtext & "&Subject=" & "Title"
    aAddedtext = sAddedtext & "&Body=" & "Attachment s:"

    sAddedtext = sAddedtext & "Attach=" & Chr$(34) & Me!txtAttachmen t & Chr$(34)

    stext = "mailto:" & stext

    stext= stext & sAddedText

    call ShellExecute(Me .hwnd, "open",stex t, vbNullString, vbNullString,
    SW_SHOWNORMAL)


    The txtAttachment is a text box with the path of the attachment.

    I have two problems :

    1) I can only attach 1 attachment, how can I attach two attachments?
    2) How can I automatically send the email without is window appearing?

    Thanks in anticipation

    Kevin


Working...