>>>meanwhile i think using Mosby's control might be a better solution
>>
>>Ok, I'll try that.
>
>I tried, and there isn't any documentation or samples for VFP. Have more experience about sending mail with VFP ?. Thanks.
I just downloaded and used Mosby's control. I couldn't access the demos, but I got it working properly. Here are my VERY POSITIVE experiences.
Extract the files by running the mail.exe. Then, go into VFP and add the OLE control "SMTP Control" to your Default OLE Controls (on my NT machine, the ocx file is located at WINNT/System/Mail32.OCX).
Now, create a new class based on a form and drop the SMTP ole control onto that form. Give the OLE a good name like ³olemail². I made the form invisible (form.visible = .F. and form.enabled = .F.) so that I could send mail from a CGI program. I also added a method to the form called sendmail. This method is:
LPARAMETERS tcTo, tcSubject, tcCC, tcBody
this.OleMail.OriginatingName =
this.OleMail.OriginatingAddress =
this.OleMail.DomainName =
this.OleMail.MailPriority = 3 &&Normal Priority
this.OleMail.Sendmail(, tcSubject, tcTo, tcCC, tcBody)
RETURN this.OleMail.ErrorNumber
I believe that you have to fill in OleMail.DomainName and OleMail.OriginatingName to get it working.
The .hlp file that comes with it does explain the properties and methods, but doesnt give you a step by step approach.
The control will flash a promotion screen every time you edit the class containing it or create an object that contains the control (it does go away in about 10 seconds). Presumably, when I pay the shareware, I will get a copy that doesnt show this screen.
Overall, very easy to use - much more simple than the ActiveX or trying to access a command line mailer such as Blat.
-John Gore
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement