View Single Post
  #5 (permalink)  
Old December 24th, 2012, 12:34 AM
john02813 john02813 is offline
Registered User
Points: 25, Level: 1
Points: 25, Level: 1 Points: 25, Level: 1 Points: 25, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2010
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default I use vb 6 with Windows Live to send email

'you need to have MAPI as a component on your form.
If MAPISession1.NewSession Then
' check if session is already opened
Else
With MAPISession1 'MAPISession
' Set DownLoadMail to False to prevent immediate download.
.DownLoadMail = False
' Use the underlying email system's logon UI.
' .UserName = "john02813@hotmail.com"
' .Password = "hotrunner12"
' .LogonUI = True
.SignOn
.NewSession = True
MAPIMessages1.SessionID = .SessionID
End With

With MAPIMessages1 'MAPIMessage

' .SessionID = MAPISession1.SessionID
' .Fetch
' For i = 0 To .MsgCount - 1
' .MsgIndex = i
' lst.AddItem .MsgSubject
' lst.ItemData(lst.NewIndex) = i
' Next
.Compose
.RecipDisplayName = "John Alexander"
.RecipAddress = "john02813@hotmail.com"
.AddressResolveUI = True

.MsgSubject = "Just another VB test"
.MsgNoteText = "I am still trying to send you email from VB"
.Send False
.SessionID = MAPISession1.SessionID

End With
MAPISession1.NewSession = False ' Flag for new session.
MAPISession1.SignOff

End If
Me.MousePointer = vbDefault
Reply With Quote