>>SET EXACT ON >>clear all >>store "chris@goms.com" to sendsname >>store "auth.smtp.oneandone.co.uk" to servy >>STORE "cna@colin-northway.com" TO emailto >>do emailsendxx with servy,sendsname,emailto,"Stock Report","" >> >>procedure emailsendxx(strserver,strfrom,strto,strsubject,strbodytext) >> PRIVATE qx, SMTP >> >> SMTP = CreateObject("EasyMail.SMTP") >> SMTP.MailServer = strServer >> SMTP.FromAddr = strFrom >> SMTP.AddRecipient("", strTo, 1) >> SMTP.ESMTP_AuthMode =1 >> SMTP.ESMTP_Account = "m34758193-10" >> SMTP.ESMTP_Password = "ngoloosh" >> smtp.addattachment("o:\stock\stocka.doc",0) >> SMTP.Subject = strSubject >> SMTP.BodyText = strBodyText >> smtp.licensekey="colinnorthway (Single Developer)/09A0630C108281002C77" >> qx = SMTP.Send() >> If qx = 0 Then >> MessageBox("Message sent successfully.") >> Else >> MessageBox("There was an error sending your message. Error: " + AllTrim(Str(qx))) >> EndIf >> Release SMTP >