Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sending email on a given date
Message
De
03/06/2009 09:02:09
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01403273
Message ID:
01403370
Vues:
29
Hi Robin

here's another idea (I haven't tried this but I was thinking about your requirement and how to achieve it).

You could create a scheduled job when the user creates the email to send in the future and give it the time and date they want.

You could also I guess automatically delete the scheduled job after its run as well to keep the scheduler neat.

Here's an example

http://www.news2news.com/vfp/?example=490

.




>Hi Nick
>
>Perhaps your right, just that emails need to be sent at different intervals. Say the day before the visit, and the email could be "created" by the user say a week before the visit . Thought i'd read somewhere that Outlook can delay an email being sent until after a given date time.
>
>I'll take a look at setting up a service.
>
>Many thx
>
>Robin
>
>>Hi Robin
>>
>>If you've set the windows task scheduler to run your program (which automates outlook) like Al suggests doesn't that give you what you want.
>>
>>Your users don't have to run your program at all, the scheduler takes care of that. They need never know as its run in the background.
>>
>>Nick
>>
>>>Hi Al
>>>
>>>Really want to be able to give the email to Outlook, and let Outlook send it when it appropriate. My users are more likely to be running Outlook most of the time than my program.
>>>
>>>>>Anyone know how to get Outlook to send an email on a given date from Foxpro?
>>>>
>>>>There are at least a couple of approaches:
>>>>
>>>>1. Have a VFP program running continuously. Within VFP, determine if it's now the time to send the message. You could use a Timer control, or a loop with a Sleep API call for this (use a long timer interval e.g. a minute or longer so your program doesn't hog CPU).
>>>>
>>>>After the desired date/time is reached, and the message sent, the program can keep running, or can terminate itself.
>>>>
>>>>2. Create a VFP program that only knows how to send a mail immediately. Then, use the Windows Task Scheduler to schedule when this program will be run.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform