Click here to Skip to main content
15,886,795 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i would like to send msg to client of invoice created thro vb6. so i would like to connect to outlook express and send the details to various clients on that particular day.

with regards,


prashant. g. rahate.
Posted
Comments
Sandeep Mewara 19-May-10 6:05am    
Good to know you want to do this. now what? Are you asking for code? If so, you need to show what have you done till now. Effort?

1 solution

Hey, just try this:
Set the component: Microsoft MAPI Controls
And now, go to the form and place the MAPISession and the MAPIMessages control.
And here is the code:
' User logon and SessionID
With MAPISession1
' username and password (for your account)
.UserName = "Name"
.Password = "password"
.SignOn
' SessionID
MAPIMessages1.SessionID = .SessionID
End With
' send mail
With MAPIMessages1
' new message
.Compose
' to receiver
.RecipAddress = "lalala@web.de"
' subject
.MsgSubject = "Test-Nachricht"
' text
.MsgNoteText = "Nachrichtentext"
'
.ResolveName
' send message
.Send
End With
and thats it...
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900