Results 1 to 6 of 6

Thread: Send Email in VB

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2001
    Posts
    115

    Cool Send Email in VB

    Hi All,

    In my application, i need to send out email automatically. I have the email address and context ready. So i don't need any interface. Is there a function in VB , kind of like msgbox, instead of sending message to screen or file, i can send an email message to a specified address. Thanks .

  2. #2
    chenko
    Guest
    You can either use MAPI or winsock and send commands to a email server...

  3. #3
    chenko
    Guest
    MAPI code

    With MAPISession1
    .SignOn
    End With
    With MAPIMessages1
    .SessionID = MAPISession1.SessionID

    .Compose
    .RecipAddress = "[email protected]" 'used during test phase
    .MsgSubject = "New REP file loaded"
    .MsgNoteText = "New REP file '" & txtOutputFile & "' has been saved to " & repOutputPath & Chr(13) & "There were " & repErrorsCorrected & " error(s) corrected"
    .ResolveName
    .Send False

    End With

    add the MAPI controls to your project.///

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Jan 2001
    Posts
    115
    Thanks a lot, chenko. I will try your code .

  5. #5
    chenko
    Guest
    ignore the "'used durning test phase" that was just a peice of my code copied.

  6. #6

    Thread Starter
    Lively Member
    Join Date
    Jan 2001
    Posts
    115
    Chenko,

    I got problem when i was trying your code. For .logon statement, i got error message:" Error in Loading MAPI DLL". I looked at microsoft's website for this error. It says "Direct Mail Manager" needs to be installed. Is that ture? Another thing, before .logon, should i specify the server name, username, password, etc.? Thanks in advance.

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