I'm sorry, I haven't understand that it is necessary to send mails using Outlook. If so, solution is Outlook automation (example bellow). JMail sends mails directly to the SMTP server, no e-mail client is required.
<code>
* Class requires .roOutLook and .roOutLookItem properties
THIS.roOutLook = NEWOBJECT( 'Outlook.Application' )
IF TYPE('THIS.roOutLook')='O' AND NOT ISNULL(THIS.roOutLook)
THIS.roOutLookItem = THIS.roOutLook.CreateItem( 0 )
WITH THIS.roOutLookItem
.Subject = m.tcMsgSubject
.Body = m.tcMsgNoteText
STORE '' TO .To, .Cc, .BCc
FOR lni=1 TO m.tnRecipients
DO CASE
CASE taRecipients[m.lni,2]=1 && standard
.To = IIF( EMPTY( .To ), '', .To+';' )+taRecipients[m.lni,1]
CASE taRecipients[m.lni,2]=2 && CC
.Cc = IIF( EMPTY( .Cc ), '', .Cc+';' )+taRecipients[m.lni,1]
CASE taRecipients[m.lni,2]=3 && BCC
.Bcc = IIF( EMPTY( .Bcc ), '', .Bcc+';' )+taRecipients[m.lni,1]
ENDCASE
ENDFOR
FOR lni=1 TO m.tnAttachments
.Attachments.Add( taAttachments[m.lni], 1 )
&& with ,1: portal.dfpug.de/dFPUG/Dokumente/Konferenzen/VFP-Konferenz%202002/47_D-IUPD.pdf
&& without ,1:
I use the following code in many of my programs. It is very simple and works fine. The only negative is that outlook needs to be running on the client.
I understand you're looking for an Outlook solution, but if that requirement changes, you will definitely want to look at the free BLAT.DLL which can be installed without registration.
BLAT.DLL is a 100K file that provides a complete mix of SMTP capabilities including text/html email, multiple attachments, with support a for a variety of authentication and encoding schemes. BLAT is available at
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.