asked on
m.file1="http://www.notarealurl.com/example/example/"+subs(dtos(m.date1),5,2)+righ(dtos(m.date1),2)+subs(dtos(m.date1),3,2)+".pdf"
m.file2=""c:\test.pdf"
m.text="This is the PDF, which is also found on the Portal at: "+m.file1
decl inte URLDownloadToFile in urlmon.dll inte pCaller, stri szURL, stri szFileName, inte dwReserved, inte lpfnCB
=URLdownloadtofile(0,(m.file1),(m.file2),0,0)
if file(m.file2)
oMSG = createobject("CDO.Message")
oMSG.To = "null@null.com"
oMSG.From = "null@null.com"
oMSG.Replyto = "null@null.com"
oMSG.Subject = "PDF"
oMSG.TextBody= m.text
oMSG.addattachment(m.file2)
oMSG.MimeFormatted=.t.
oMSG.Send()
endi