Brute Force Programming banner
MIDImage Hangman PushPix Other Programs Delphi Code Site Map

AutoMail

version 1.0

Requirements:

32-bit Windows (95/98/NT), a connection to an SMTP email server or MS Exchange.

Scenario: You have a daily process that runs...for instance, a report generated by FoxPro for people in your organization. After the report is completed, you need to distribute the results.

You could, of course, put the results in a shared directory so people could access them as needed, but that has its drawbacks. Someone might...ahem...accidentally delete the results. Or perhaps some of the people needing the report aren't on the network.

A better choice might be to email each person, attaching a copy of the report, and that is where AutoMail comes in.

Simply create a configuration file with the email addresses and attachment filenames, and call AutoMail.

You can either place a copy of AutoMail and its AutoMail.ini file a directory, and call it directly with no parameters

-or-

put AutoMail somewhere on the Path (\Windows\System, for instance), and call it with the full path to the configuration file as a commandline parameter.

Examples:

exec C:\AutoMail\AutoMail.exe

-or-

exec AutoMail.exe F:\Projects\Reports\daily.cfg


The Configuration File:

[Mail]
Subject=A Report For You
From=me@ourserver.com

[To]
1=fred@ourserver.com
2=mary@someotherserver.com

[CC]
1=bob@outserver.com
2=

[SMTP]
Host=192.168.0.1

[User]
Profile=MS Exchange Settings

[Attachments]
1=F:\Projects\Reports\report1.dat
2=F:\Projects\Reports\report2.dat

[Body]
1=Attached is the daily datafiles
2=generated using the current status
3=and parameters

If an [SMTP] Host is specified, AutoMail will use plain vanilla SMTP to mail the files.

If no [SMTP] Host is specified, AutoMail will attempt to mail the files via MAPI (MS Exchange or equivalent) and use the profile specified in [User] Profile. If no Profile is specified, AutoMail will try to use the default profile of the system.

The numbers used for the lines in the [To], [CC], [Attachments], and [Body] sections are irrelevant. Their value and order make no difference to the program. The only requirement is that they be different.

Download

© 2004 Brute Force Programming
ALL RIGHTS RESERVED