Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to send email in VFP?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Divers
Thread ID:
00497834
Message ID:
00530655
Vues:
46
OOPS I think I forgot one line of code in my web page.
this is what you are missing.
set classlib to email addi

the class file you downloaded is called email.vcx right you need to tell your startup program that you are going to be looking in that file, for classes
one of the classes is called blat... blat has propertites which need to defined
propertites

to
subject
message
from
user
mailfrom
msg
password
sender
server
try
file

the ones requred to send emails are
(to get oemail.send() to work are )

to
from
user
subject
file && defaults to blat.txt


The properites which need to be set for install oemail.install() to work are
server
user

Line 5 in the init of the blat class might be a bug. if you get an error there.
change the line to read
Set SAFETY &l_safety

here is how you would get to it directly, if you dont know how to use the class browser
MODIFY CLASS blat of email.vcx method init

or open the class browser, select the email.vcx file, select blat. and then go to propertites, and edit the init method.


the class blat also has two custom methods.
install()
send()


some of the custom propertites I put in the class, are not at this time actally used. like the propertity html I put them there, becuase someone, someday might want to use blat to send html emails (which it can be done) and setting this property to .t. and modifying the code in send, a little shoudl get it to work. Like I said, my class, is a little beta, but it does do the basics, personally I was hopeing that someone, somwhere, would help me make it bit more robust.

bob Lee.



>Sorry, I think I just asked you a stupid question about the smtp server. I know now, I just need to use teststring = "-install smtp.aaa.com" to set it in VFP, right?
>
>I missed another question. I tried to download your BLAT VFP class in your page and added in my VFP program but I don't know how to use this class and how to call its method. I tried to follow what your page said:
>oemail=create("blat")
>oemail.to="power@hknet.com"
>oemail.subject="Testing of blat.dll"
>oemail.message="Bodyfilename.txt"
>oemail.send()
>release oemail
>But it said no object "blat", can you explain what should I do? I don't family with making a new class in VFP.
>
>Thanks
In the beginning, there was a command prompt, and all was well.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform