|
-
Aug 2nd, 2001, 07:19 AM
#1
Thread Starter
Lively Member
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 .
-
Aug 2nd, 2001, 07:25 AM
#2
You can either use MAPI or winsock and send commands to a email server...
-
Aug 2nd, 2001, 07:27 AM
#3
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.///
-
Aug 2nd, 2001, 07:35 AM
#4
Thread Starter
Lively Member
Thanks a lot, chenko. I will try your code .
-
Aug 2nd, 2001, 07:42 AM
#5
ignore the "'used durning test phase" that was just a peice of my code copied.
-
Aug 2nd, 2001, 08:35 AM
#6
Thread Starter
Lively Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|