Lparameters tcMessage Local lcSchema, loConfig, loMsg, loError, lcErr, lcTextBody, lcRecipient1, lcRecipient2, lcRecipient3, ; lcLogin, lcPassword, lcSMTPPort, lcSMTPServer, lcAllRecipients, lcBCC, lcCC * did we get a message? If not get out now If Pcount() > 0 lcTextBody = ALLTRIM( tcMessage ) ELSE * how this could happen is beyond me but get out now Return Endif * Open Comset.dbf and get setup information Do openit In Main With "data\comset" * up to 3 recipients * these will be phone numbers @ vtext.com for example * they can also be email addresses lcRecipient1 = ALLTRIM(comset.rec1) * if there is no rec1 then get the hell out also * no reason to continue if there isnt anyone to send If Empty(lcRecipient1) WAIT WINDOW "Ummmmm..... There is NO Phone Number to Text or Email - Exiting Now " TIMEOUT 5000 Return Endif * OK we have at least one so lets get going * 2nd person now. Use Blind Carbon Copy for simplicity lcRecipient2 = ALLTRIM(comset.rec2) If .Not. Empty(lcRecipient2) * if not empty then do nothing except set variable for bcc lcBCC = lcRecipient2 Else lcBCC = "" Endif * 3rd person now * uses Carbon Copy property lcRecipient3 = ALLTRIM(comset.rec3) If .Not. Empty(lcRecipient3) lcCC = lcRecipient3 Else lcCC = "" Endif * Now the setup info for the important stuff lcLogin = comset.login lcPassword = comset.pword lcSMTPPort = comset.smtpport lcSMTPServer = comset.servr * close comset - can't afford corrupted files SELECT comset USE lcErr = "" lcSchema = "http://schemas.microsoft.com/cdo/configuration/" loConfig = Createobject("CDO.Configuration") With loConfig.Fields .Item(lcSchema + "smtpserver") = alltrim(lcSMTPServer) &&"mail.crew-chief.com" .Item(lcSchema + "smtpserverport") = (lcSMTPPort) &&587 && yr smtp port && .Item(lcSchema + "sendusing") = 2 .Item(lcSchema + "smtpauthenticate") = .T. .Item(lcSchema + "smtpusessl") = .F. .Item(lcSchema + "sendusername") = alltrim(lcLogin) .Item(lcSchema + "sendpassword") = alltrim( lcPassword ) .Update Endwith loMsg = Createobject ("CDO.Message") With loMsg .Configuration = loConfig .From = "don@crew-chief.com" .To = lcRecipient1 .bcc = lcBCC .cc = lcCC * .DSNOptions=2 & if u define this setting mails are not save at sender end .Subject = "" .TextBody = ( lcTextBody ) * don't need attachments on this method so comment them out *.AddAttachment(GetFile()) * .Send() * Endwith If Vartype(loMsg)='O' WAIT WINDOW "Sent Information over the internet..." nowait Else Messagebox('Error: Could Not Send - Something in your information is incorrect. Contact us to get help', 16 , "Failed due to error") Endif Release lcMessage,lcSchema,loConfig,loMsg,loError,lcErr * return to race just to be sure SELECT race Return