> >DO SendNetMessage > >PROCEDURE SendNetMessage >LOCAL oMsg >cYourAddress = "youruser@yourmail.com" >cYourUser = "youruser@yourmail.com" >cYourPassword = "yourpassword" > >oClient = CLRCreateObject("System.Net.Mail.smtpclient") >oMsg = CLRCreateObject("System.Net.Mail.MailMessage") > >* Creates an attachment >oAttachment = CLRCreateObject("System.Net.Mail.Attachment","c:\negocios\test.xls") > >oMsg.Attachments.Add(oAttachment) > >oMsg.From = CLRCreateObject("System.Net.Mail.MailAddress",m.cYourAddress) > >oSenderAddress = CLRCreateObject("System.Net.Mail.MailAddress",m.cYourAddress) > >oMsg.Subject = "This day of Valentine" >oMsg.body = FILETOSTR("c:\negocios\valentine-2007.txt") > >* This is to authenticate with the SMTP server >oCredentials = CLRCreateObject("System.Net.NetworkCredential",m.cYourUser,m.cYourPassword) >oClient.Host = "localhost" > >oClient.Credentials = oCredentials > >m.cToAddress = "toAddress@ToServer.com" > >oToAddress = CLRCreateObject("System.Net.Mail.MailAddress",m.cToAddress) >oMsg.To.Clear() >oMsg.to.Add(m.oToAddress) >WAIT WINDOW "Sending "+m.cToAddress NOWAIT >oClient.Send(oMsg) > > >