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
PROCEDURE SendMailOutlook
LPARAMETERS tcMsgSubject, tcMsgNoteText, ;
tnRecipients, taRecipients, ;
tnAttachments, taAttachments, ;
tcFromMail, tcFromName, ;
tcUserName, tcPassWord, ;
tlShowClient
EXTERNAL ARRAY taRecipients, taAttachments
LOCAL lni, llProblem
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:
ENDFOR
.Send()
ENDWITH
THIS.roOutLookItem = NULL
ELSE
llProblem = .T.
ENDIF
RETURN NOT m.llProblem
</code>