ccb
01-15-2002, 01:52 PM
how can i send an email to an email-account just by using VB/API or whatever.... kind of simple outlook-express-clone...
???
???
sending a mail just using VBccb 01-15-2002, 01:52 PM how can i send an email to an email-account just by using VB/API or whatever.... kind of simple outlook-express-clone... ??? Flyguy 01-15-2002, 01:54 PM You could, for a start, have a look at the example project VBMail to be found in the vb samples directory, under misc. reboot 01-15-2002, 01:55 PM winsock and smtp (simple mail transport protocol). Robby 01-15-2002, 06:13 PM MAPI is quite easy, here's a sample...you will need to insert mapiSession and mapiMessage on your form ( component = MAPI 6.0) Private Sub Command1_Click() Dim ms As MAPISession Set ms = MAPISession1 Dim mm As MAPIMessages Set mm = MAPIMessages1 Dim AttachPath As String Dim AttachFileName As String Dim nSessionID As Long With ms .NewSession = True .DownLoadMail = False .SignOn nSessionID = .SessionID End With With mm .SessionID = nSessionID .Compose .RecipDisplayName = "DisplayNameTo" .RecipAddress = "EmailAddressTo@hotmail.com" .MsgSubject = "Subject" If AttachFileName <> "" And AttachPath <> "" Then .AttachmentPathName = AttachPath & AttachFileName .AttachmentName = AttachFileName End If .MsgNoteText = "EmailBody" .Send False End With ms.SignOff End Sub Wormlett 02-21-2002, 10:13 PM how do i get that component or watever?? Qoute: MAPI is quite easy, here's a sample...you will need to insert mapiSession and mapiMessage on your form ( component = MAPI 6.0) orufet 02-21-2002, 10:14 PM Project menu >> Components divil 02-22-2002, 03:03 AM I dislike MAPI. I suggest the same thing as reboot did, using winsock (control or API) and learning the SMTP protocol (very easy). If you want to send anything other than the most simple of emails (like HTML, or attachments) you'll have to learn how to MIME encode too. ChiefRedBull 02-22-2002, 07:15 AM SMTP is easy.... and even better - there's a ready made component ready for you to drag and drop into your project in the Code Library. Its on a plate for you... POP3 is pretty simple too for receiving mails, but MIME is hard. I guess it needs to be learnt though, if you're gonna take emailing seriously. |
EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum