News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

sending mail using win32 api....

Started by Vineel Kumar Reddy Kovvuri, November 22, 2007, 03:47:00 AM

Previous topic - Next topic

Vineel Kumar Reddy Kovvuri

hi

I can anybody please give me a clue on how to send mail(simple pop3 text mail) using win32 api....routines....

thanks inadvance...


six_L

.data
MAPImsg MapiMessage <0>
MAPIRecip MapiRecipDesc <0>
buff db 100000 dup (0)

.code
SendTheEmail proc
LOCAL func,hLibrary:DWORD

invoke LoadLibrary,sadd("MAPI32.DLL")
mov hLibrary, eax
invoke GetProcAddress,eax,sadd("MAPISendMail")
mov func,eax
mov MAPImsg.lpszSubject, CTXT("SUBJECT TEXT")
mov MAPImsg.lpszNoteText, o$ buff
mov MAPImsg.nRecipCount,1
mov MAPImsg.lpOriginator, o$ MAPIRecip
mov MAPImsg.lpRecips,o$ MAPIRecip
mov MAPIRecip.ulRecipClass,MAPI_TO
mov MAPIRecip.lpszName,CTXT("Jimmy Clif")
mov MAPIRecip.lpszAddress,CTXT("SMTP:jimmyclif@fastmail.fm")

Scall func,0,0,o$ MAPImsg,MAPI_NEW_SESSION,0
PrintHex eax

invoke FreeLibrary,hLibrary
ret
SendTheEmail endp
regards

Draakie

Or a robust discussion on the topic at

http://www.masm32.com/board/index.php?topic=6578.0

But sIX_L gave the crux of the matter....
Does this code make me look bloated ? (wink)

Vortex

An example from the GeneSys package : SendMail

[attachment deleted by admin]

Vineel Kumar Reddy Kovvuri

You guys r the best......................thanks a lot for ur help............