Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
An application working as an automatic mail sending
Message
From
30/10/2003 06:32:05
 
General information
Forum:
Visual FoxPro
Category:
Third party products
Miscellaneous
Thread ID:
00844439
Message ID:
00844443
Views:
21
Hi Ali

We made such a program ourself with VFP and Outlook, although you can also do this without Outlook, for instance via MAPI or SMTP. The only difference is that we don't use a shared directory but a shared DBF, but the principle is the same.

What you do is something like this (this is semicode, not real code:
DO WHILE .T.
   WAIT 'Waiting for job!' WINDOW TIMEOUT 60 && Or some other command to create a wait state
   nFilecount=ADIR('aFilearray','shared directory\*.*')
   IF nFilecount>0
      FOR nCounter=1 to nFilecount
         SENDEMAIL(aFilearray(nCounter)) && Call a procedure
      ENDFOR
   ENDIF

ENDDO
You must of course create some procedures to get the email recipents address.

In my case we have a DBF (Mailjob) with the following structure:

JOB C(2) && 'MA' = email, 'FX' = telefax, 'LT' is letter
Recipent Memo && Email address, telefax number or complete address if letter
CC memo
BCC Memo
Subject Memo
Message Memo
Sender C(2) && Initials of sender, real name picked from employee DBF
Finished L && With index tag


Then we use a code like this (also semicode)
DO WHILE .T.
   WAIT 'Waiting for job!' WINDOW TIMEOUT 60 && Or some other command to create a wait state
   select * from Mailjob where !finished into array aMailjob
   nNumberofjobs=_TALLY
   IF nNumberofjobs>0
      FOR nCounter=1 to nNumberofjobs
         SENDEMAIL(aMailjob(nCounter)) && Call a procedure
      ENDFOR
   ENDIF
ENDDO
Hope this is some help for you.

>I need an application working as an automatic mail sending server. This application can send a file when is putting in common directory by any users in an network
>
>Is there any free program for using this purpose
>
>Thank in Advance
>
>Ali Altun
Previous
Reply
Map
View

Click here to load this message in the networking platform