if type('oSession')<>"O" oSession=createobject("MAPI.Session") oSession.Logon("MS Exchange Settings",.f.) endif oMessage=oSession.OutBox.Messages.Add() oMessage.Subject="Email Test" oMessage.Text="Skol'ko mozhno zhdat'" oAttach=oMessage.Attachments.Add() With oAttach .type=1 .name="c:\temp\text1.txt" .readfromfile("c:\temp\text1.txt") endwith oAttach.name="text1.txt" oRecipient=oMessage.Recipients.Add() with oRecipient .Name="ed pikman" .Address="SMTP:epikman@usa.net" .AddressEntry.Type="SMTP" .AddressEntry.Address="epikman@usa.net" endwith oMessage.Update() oMessage.Send(.t.,.f.)