home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2001 October
/
Chip_2001-10_cd1.bin
/
sharewar
/
gdidbpro
/
data1.cab
/
Example_Files
/
projects
/
default
/
mailshot.scp
< prev
next >
Wrap
Text File
|
2000-05-26
|
2KB
|
54 lines
##########################################################
# GDIdb demo script (c) 1998 Global Data Industries
#
# This script sends a personalised e-mail to everyone in
# the database. The disadvantage of sending a personalised
# e-mail is that if the list is large, the mailing will
# take a long time as GDIdb will have to send each
# personalised copy of the e-mail to the mail server.
##########################################################
##########################################################
# this database contains the list of e-mail addresses
# and contact information
&datasource("Driver={Microsoft Access Driver (*.mdb)};DBQ=examples.mdb")
##########################################################
# Alter the following line to &dialup(TRUE) if you want
# GDIdb to dial your Internet connection before sending
# e-mails.
&dialup(FALSE)
{
&getdata("SELECT * FROM tblEmployees")
{
# send a personalized e-mail to each employee
&sendmail("mail.mydomain.com","me@mydomain.com","?email?")
{
HEADER:
From: "Fred" <fred@mydomain.com>
To: ?email?
Subject: Christmas Party
Date: ?gdidbdate.dn?, ?gdidbdate.d? ?gdidbdate.mn? ?gdidbdate.y? ?gdidbtime?
BODY:
Dear ?employeename?,
We are writing to inform you of this year's Christmas party. To thank you for
your ?duration? years of hard work, the company wishes to take you to Hawaii
for a week-long surfing holiday. Boards and wax shall naturally be provided
complements of the company.
Hang five,
--
Fred Bloggs MD
}
}
}