HI,
So I have some MAPI code that work Just the way I want it to on XP and dosn't work at all on Windows 7. ( I wish I could find the time to just port the whole thing over to .net but I don't)
EDIT For any one from the future reading this is the wrong way to go about sending to the desktop client. See post #15. Use Edanmo's code plus my tweak.
I've Also Tried this http://support.microsoft.com/kb/163216 but it seems geared toward just outlook and still doesn't work at all on win 7.Code:' DFIMAPISession is a MAPISession on the form (MSMAPI32.oxc) 'DFIMAPIMessages is a MAPIMessage on the form. 'I develop on a Win 7 No Sp1 Private Sub Command3_Click() Let DFIMAPISession.DownLoadMail = False '--------------------------------------------------- 'Sign on Session '--------------------------------------------------- If (DFIMAPISession.SessionID = 0) Then Call DFIMAPISession.SignOn 'Runs fine End If With DFIMAPIMessages .SessionID = DFIMAPISession.SessionID 'Runst fine but SessionID = 0 .Compose' Throws Mapi failure: Valid session id does not exist '32053' .AddressResolveUI = False .MsgSubject = "This is a subject." .MsgNoteText = "This is a body." .RecipIndex = 0 .RecipType = 1 .RecipAddress = "smtp: [email protected]" .RecipDisplayName = "smtp: [email protected]" .Send True End With End Sub
What I'm trying to accomplish is an emulation of right Click Sendto > Mail Recipient but from my VB6 application. I currently am using a light CDO send mail form but more and more customers are asking that my program output be sent to their mail client.
I've also looked at http://www.codeproject.com/Articles/...ck&fr=26#xx0xx
and
http://www.codeproject.com/Articles/...mail-recipient
Thank you
Ron




Reply With Quote
