I am running VFP 9 and a simple program which does a SMTP send (Easy Mail Objects) - I run it once - the send is fine - I send it again p- the send is fine - then VFP 9 crashes
Any ideas? - this is my code
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
Specialist in Advertising, Marketing, especially Direct Marketing
I run courses in Business Management and Marketing