Results 1 to 3 of 3

Thread: Automatic E-mail ??

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2000
    Posts
    10
    Hello,

    I am using VB 5 as an interface to a database to record details of employees attending work. If they have bad attendance I would like to be able to automatically genertate a standard e-mail which would be sent to them using their e-mail address, which is stored in the Employee DB table.

    I have Pegasus Mail as an e-mail package and I was wondering how I would go about trying to accomplish this task and what sort of coding would be necessary.

    I hope someone can help.
    Thanks,
    Andy...........

  2. #2
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844
    I doubt Pegasus is as programmable as MS Outlook is, but you can use MAPI or CDO to send mail via VB...sorry, I don't have any good links for you though...

  3. #3
    New Member
    Join Date
    Mar 2000
    Posts
    10

    Automatic E-mail ??

    Hi,
    You can try the following code, which works by calling the default e-mail application:

    Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

    (Add this code at the top of your form, and then call the function using this line of code)

    ShellExecute Me.hwnd, "open", "mailto:[email protected]", vbNullString, vbNullString, 0


    Hope this helps,
    shovels

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