Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Output to email
Message
De
19/08/2015 18:17:51
 
 
À
19/08/2015 16:42:18
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP
Network:
Windows XP
Database:
MySQL
Application:
Desktop
Divers
Thread ID:
01623606
Message ID:
01623616
Vues:
58
>I'm able to print the report to Word, PDF.
>But my clients want the file to be sent to email as well.
>how can I do that?
>
>My clients use both Outlook and Outlook Express

I'd be inclined to create the Word/PDF as normal, then use CDO2000 to send the mail:

https://www.berezniker.com/content/pages/visual-foxpro/cdo-2000-class-sending-emails

Reliable and included by default in Windows OSs up to and including Server 2012 R2. It does require an available SMTP server and that you know how to connect to it.

The main downside to this approach is the sent message isn't immediately stored in the "Sent messages" folder. But, a few comments about that:

1. Getting those messages in Sent Messages works only for Outlook, it doesn't work for Outlook Express or any of its descendants that can't be automated via COM, or for webmail users

2. This issue can be worked around for all mail clients by bcc:'ing a copy to the user's Inbox. This works for all mail clients and other types of recipients such as webmail. That way the user will always have a copy of the message no matter what type of mail system they use. Most users don't get too bent out of shape getting mail like this in their Inbox, it's easy enough for them to manually move to Sent Items. In some cases users may even appreciate getting a copy in their Inbox so they can confirm the message was sent and not have to search their Sent Items.

3. You can optionally do a trick such as include a unique string like "[MyProgram Sent Mail]" in the subject line or message body. The user can then set up a rule in the mail client or webmail to automatically move those messages into Sent Items.

That's what I'd recommend if you want an approach that works with all types of mail systems.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform