Article View: borland.public.cppbuilder.nativeapi
Article #13560Re: Send a mail with attachment
From: David Ayre
Date: Thu, 02 Oct 2003 18:31
Date: Thu, 02 Oct 2003 18:31
33 lines
2248 bytes
2248 bytes
Thanks Andrue and Remy, That clarifies things a bit. Cheers, David Ayre Knaresborough, UK. "Remy Lebeau \(TeamB\)" <gambit47@yahoo.com> wrote: > >"David Ayre" <davidcayre@aol.com> wrote in message >news:3f7beff9$1@newsgroups.borland.com... > >> I have managed to build the .lib file for the mapi32.dll and the >> programme compliles. I now have the problem that it returns an >> error code saying that logon failed. > >You did not call MapiLogon() before calling MapiSendMail(). You applied >MAPI_LOGON_UI and MAPI_NEW_SESSION to the message sturcture, but those are >not message flags to begin with. They needed to be passed to the >MapiSendMail() function instead, not the MAPIMESSAGE structure: > > lpMessage.flFlags = 0; > ULONG ulResult = MAPISendMail(0, 0, &lpMessage, MAPI_LOGON_UI | >MAPI_NEW_SESSION, 0); > > >Gambit > >
Technical Details
Message-ID:
<3f7c6f1b@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!sn-xit-03!sn-xit-06!sn-xit-09!supernews.com!216.170.153.135.MISMATCH!tdsnet-transit!newspeer.tds.net!news-out1.nntp.be!propagator2-sterling!news-in-sterling.newsfeed.com!npeer.de.kpn-eurorings.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3f70794d@newsgroups.borland.com> <3f784a32@newsgroups.borland.com> <3f79708b@newsgroups.borland.com> <3f79860c@newsgroups.borland.com> <3f799567@newsgroups.borland.com> <3f79bd46$1@newsgroups.borland.com> <3f79c517@newsgroups.borland.com> <3f79d851@newsgroups.borland.com> <3f7a8b6d$1@newsgroups.borland.com> <3f7beff9$1@newsgroups.borland.com> <3f7c5204@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,23d9e1242f297072 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-10-02 12:32:06 PST From: "David Ayre" <davidcayre@aol.com> Sender: "David Ayre" <davidcayre@aol.com> Reply-To: "David Ayre" <davidcayre@aol.com> Subject: Re: Send a mail with attachment Newsgroups: borland.public.cppbuilder.nativeapi X-User-Info: 195.93.34.11 References: <3f70794d@newsgroups.borland.com> <3f784a32@newsgroups.borland.com> <3f79708b@newsgroups.borland.com> <3f79860c@newsgroups.borland.com> <3f799567@newsgroups.borland.com> <3f79bd46$1@newsgroups.borland.com> <3f79c517@newsgroups.borland.com> <3f79d851@newsgroups.borland.com> <3f7a8b6d$1@newsgroups.borland.com> <3f7beff9$1@newsgroups.borland.com> <3f7c5204@newsgroups.borland.com> NNTP-Posting-Host: 207.105.83.66 Message-ID: <3f7c6f1b@newsgroups.borland.com> Date: 2 Oct 2003 11:31:55 -0700 X-Trace: newsgroups.borland.com 1065119515 207.105.83.66 (2 Oct 2003 11:31:55 -0700) Lines: 34 Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!sn-xit-03!sn-xit-06!sn-xit-09!supernews.com!216.170.153.135.MISMATCH!tdsnet-transit!newspeer.tds.net!news-out1.nntp.be!propagator2-sterling!news-in-sterling.newsfeed.com!npeer.de.kpn-eurorings.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail