Home > How-To Library > Internet
How to send mail from VB app using MAPI control.
**************************************************************** * © 2007 CodeItBetter http://www.codeitbetter.com * * This notice MUST stay intact for legal use * **************************************************************** Private Sub cmdSendMail_Click() 'Add the MAPI component to your VB project. Also, add a MAPISession 'and MAPIMessage control to your form. MAPISession1.SignOn With MAPIMessages1 .MsgIndex = -1 .RecipDisplayName = Recipientemail .msgSubject = msgSubject ' subject of e-mail .MsgNoteText = Body 'message body .SessionID = MAPISession1.SessionID .Send End With MAPISession1.SignOff End Sub
If you would like to submit your code here please us. Do not forget to mention your name. We are always thankful to each and everyone of you who submitted their code here.