 |
 |

01-15-2002, 01:52 PM
|
|
|
sending a mail just using VB
|
how can i send an email to an email-account just by using VB/API or whatever.... kind of simple outlook-express-clone...
???
|
|

01-15-2002, 01:54 PM
|
 |
Lost Soul
Super Moderator * Guru *
|
|
Join Date: May 2001
Location: Vorlon
Posts: 18,887
|
|
|
You could, for a start, have a look at the example project VBMail to be found in the vb samples directory, under misc.
|
|

01-15-2002, 01:55 PM
|
 |
Keeper of foo
Retired Moderator * Guru *
|
|
Join Date: Nov 2001
Location: Graceland
Posts: 15,612
|
|
re: ccb
|
winsock and smtp (simple mail transport protocol).
|
|

01-15-2002, 06:13 PM
|
 |
Code Factory
Retired Moderator * Expert *
|
|
Join Date: Jan 2001
Location: Montreal, Ca.
Posts: 5,565
|
|
MAPI is quite easy, here's a sample...you will need to insert mapiSession and mapiMessage on your form ( component = MAPI 6.0)
Code:
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
|
|

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)
|
|

02-21-2002, 10:14 PM
|
 |
Paranoid Coder
Retired Leader
|
|
Join Date: Mar 2001
Location: Canada
Posts: 2,716
|
|
|
Project menu >> Components
|
|

02-22-2002, 03:03 AM
|
 |
Funky Monkey
* Expert *
|
|
Join Date: Nov 2001
Location: England
Posts: 1,289
|
|
|
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.
|
|

02-22-2002, 07:15 AM
|
 |
ISearchGoogle
Retired Moderator * Expert *
|
|
Join Date: May 2001
Location: england
Posts: 6,321
|
|
|
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.
|
__________________
Chuck Norris ordered a Big Mac at Burger King, and got one.
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|
|
|
 |
|