>>>PARAMETERS pc_attachmentname, pc_subject, ; >>> pc_mailtext, pc_addresslist >>> >>> >>>loMail = NEWOBJECT("lf_cdomail","cdomaillib") >>>WITH loMail >>> *-- Create error collection >>> .oErrors = CREATEOBJECT("Collection") >>> >>> .cServer = oApp.gc_smtpserver >>> .nServerPort = oApp.ln_cdoserport >>> *-- Use SSL connection >>> .lUseSSL = oApp.ll_cdousessl >>> .nConnectionTimeout = oApp.ln_cdotimeout && Default 30 sec's >>> *-- Do not use cache for cHtmlBodyUrl >>> .lURLGetLatestVersion = oApp.ll_cdogetver >>> *-- Use SMTP Server Port >>> .nSendUsingPort = oApp.ln_cdouseport >>> >>> *-- The following lines are required >>> * if your SMTP server requires basic authentication >>> .nAuthenticate = oApp.ln_cdoauthen >>> >>> .cUserName = oApp.gc_smtpuser >>> .cPassword = oApp.gc_smtppass >>> .cFrom = oApp.gc_smtpfrom >>> >>> *-- Use use testaddr for mail testing >>> IF oApp.gl_mailtest >>> .cTo = oApp.gc_testaddr >>> ELSE >>> .cTo = pc_addresslist >>> ENDIF >>> .cCC = "" >>> .cBCC = "" >>> .cHtmlBody = "" >>> >>> .cAttachment = "" >>> >>> *-- Attachments are optional Comment this line out if there are no attachments >>> IF NOT EMPTY(pc_attachmentname) >>> .cAttachment = pc_attachmentname >>> ENDIF >>> .cSubject = pc_subject >>> >>> && Uncomment next lines to send HTML body >>> &&.cHtmlBody = "<html><body><b>This is an HTML body<br> It'll be displayed by most email clients</b></body></html>" >>> >>> .cTextBody = pc_mailtext >>> >>> IF loMail.Send() <> 0 >>> DO notice WITH "Mail Sending Error" >>> ENDIF >>>ENDWITH >>>>>
loMail = NEWOBJECT("lf_cdomail","cdomaillib")loMail is created as an instance of the lf_cdomail class in the cdomaillib.vcx class library. I'm guessing that's some sort of wrapper class for various CDO mail functions.