<BLOCKQUOTE><font size="1" face="Arial, Verdana">code:</font><HR><pre>DEFINE VAR objEntry AS COM-HANDLE.
DEFINE VAR objSession AS COM-HANDLE.
DEFINE VAR objMessage AS COM-HANDLE.
DEFINE VAR objRecip AS COM-HANDLE.
DEFINE VAR objAttach AS COM-HANDLE.
DEFINE VAR one AS LOGICAL INIT YES.
CREATE "MAPI.SESSION" objSession.
objSession:Logon().
objMessage = objSession:OutBox:Messages:Add().
objMessage:Subject = "How are you doing".
objMessage:Text = "Hi, this is a test".
objRecip = objMessage:Recipients:Add().
objRecip:Name = "johannm@leones.nl".
objRecip:Type = 1.
objRecip:Resolve.
ObjAttach = objMessage:Attachments:Add().
ObjAttach:Name = "testfile as an attachment".
ObjAttach:Source = "c:\config.sys".
objMessage:Update(TRUE, TRUE).
objMessage:Send(TRUE, FALSE).
objSession:Logoff.
RELEASE OBJECT objRecip.
RELEASE OBJECT objMessage.
RELEASE OBJECT objSession.
MESSAGE "End of Message" VIEW-AS ALERT-BOX.
[/code]
DEFINE VAR objSession AS COM-HANDLE.
DEFINE VAR objMessage AS COM-HANDLE.
DEFINE VAR objRecip AS COM-HANDLE.
DEFINE VAR objAttach AS COM-HANDLE.
DEFINE VAR one AS LOGICAL INIT YES.
CREATE "MAPI.SESSION" objSession.
objSession:Logon().
objMessage = objSession:OutBox:Messages:Add().
objMessage:Subject = "How are you doing".
objMessage:Text = "Hi, this is a test".
objRecip = objMessage:Recipients:Add().
objRecip:Name = "johannm@leones.nl".
objRecip:Type = 1.
objRecip:Resolve.
ObjAttach = objMessage:Attachments:Add().
ObjAttach:Name = "testfile as an attachment".
ObjAttach:Source = "c:\config.sys".
objMessage:Update(TRUE, TRUE).
objMessage:Send(TRUE, FALSE).
objSession:Logoff.
RELEASE OBJECT objRecip.
RELEASE OBJECT objMessage.
RELEASE OBJECT objSession.
MESSAGE "End of Message" VIEW-AS ALERT-BOX.
[/code]