Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Emailing from VFP
Message
De
02/12/2013 09:22:52
 
 
À
26/11/2013 10:46:53
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Web
Divers
Thread ID:
01588455
Message ID:
01589035
Vues:
149
>I have now established that the client will install Outlook. Would it be fair to say that using outlook office automation is superior to all the other methods?
>
>>Hi All:
>>
>>Can someone direct me to some resources that deal with emailing from VFP, whether or not Outlook is installed on the machine?
>>
>>Thanks,
>>
>>Yossi

It would not. Unless you install a patch on a machine, the user may get a popup from Outlook for confirmation every time an email is sent. Emails will always go into Sent box, even if it is an email blast and you do not wish it to. By definition any time you access another program you increase the complexity and thus the chance for error. Outlook is not under your program's complete control.

On a different note, if you sent group emails be sure and send each one separately and not as an Outlook group, or bcc, etc. Otherwise you trigger spam filters, and if you send enough, a reaction from you ISP's outgoing spam filters.

That said, I suggest you use the outlookx class , which I believe is available here. Then your code is simple:
			oMail = NEWOBJECT("ol_send","outlookx")
			if oMail.cError = .t.			&& unable to instantiate outlook
				=messagebox('Error: '+oMail.cMessage, 48')
				release oMail
				exit
			endif
			oMail.Subject = jcSubject
			oMail.Body  = jcText
			oMail.Attachments = ALLTR(jcAttachments)
			oMail.TO = jcRecipients
			***.Cc = "sales@myyard.com"

			oMail.GO && the 'send' action takes place here
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform