ole kullanarak mail göndermek içIn formunuzun kod bölümüne

' 1) Yeni proje aç.
' 2) . araçlar menusunden refrences tan Microsoft CDO 1.21 Library çalıştır
' 3) Birtane buton ekleyin butonun adı command1 olarak kalsın.
' 4) form içine aşagıdaki kodları girin:


Option Explicit


Private Sub Command1_Click()
Dim objSession As Object
Dim objMessage As Object
Dim objRecipient As Object


'Create the Session Object
Set objSession = CreateObject("mapi.session")


'Logon using the session object
'Specify a valid profile name If you want To
'A**** the logon dialog box
objSession.Logon profileName:="MS Exchange Settings"


'Add a New message object To the OutBox
Set objMessage = objSession.Outbox.Messages.Add


'Set the properties of the message object
objMessage.subject = "This Is a test."
objMessage.Text = "This Is the message Text."


'Add a recipient object To the objMessage.Recipients collection
Set objRecipient = objMessage.Recipients.Add


'Set the properties of the recipient object
objRecipient.Name = "John Doe" '<---Replace this With a valid
'display name Or e-mail alias
objRecipient.Type = mapiTo
objRecipient.Resolve

'Send the message
objMessage.Send showDialog:=False
MsgBox "Message sent successfully!"

'Logoff using the session object
objSession.Logoff
End Sub