Hi there,
This proc here works perfect at work but at home it fails with error code 8004005 (E_FAIL)
Anyone has an idea why?
I disabled my firewall and have outlook properly configured. I'm confused ???
This proc here works perfect at work but at home it fails with error code 8004005 (E_FAIL)
Anyone has an idea why?
.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
I disabled my firewall and have outlook properly configured. I'm confused ???
This code works fine for me.. is outlook your default mail client?
lone_samurai5, you are my savior. It wasn't my default mail handler. Now it works fine.
Thanks.
Thanks.