Email Merger By Dave Doulton University of Southampton.

15
Email Merger By Dave Doulton University of Southampton

description

Purpose To be able to send personalised s To use data from SIR database in s To do this automatically from SIR

Transcript of Email Merger By Dave Doulton University of Southampton.

Page 1: Email Merger By Dave Doulton University of Southampton.

Email Merger

ByDave Doulton

University of Southampton

Page 2: Email Merger By Dave Doulton University of Southampton.

Content

• Purpose• Dialog• Features used• Demonstration• Summary

Page 3: Email Merger By Dave Doulton University of Southampton.

Purpose

• To be able to send personalised emails

• To use data from SIR database in emails

• To do this automatically from SIR

Page 4: Email Merger By Dave Doulton University of Southampton.

Dialog

• A single pql file containing a dialog

Page 5: Email Merger By Dave Doulton University of Southampton.

Features Used

• The development used the following useful features of SIR2000/SIR2002ß.

Page 6: Email Merger By Dave Doulton University of Southampton.

Dialog Painter

Page 7: Email Merger By Dave Doulton University of Southampton.

PQL Escape

• compute line="<mergscr> /SMTP=<smtp> /TO="+vals(<efield>)+" /FROM=<from> /FILE=<mergetmp> /SUBJECT=<subject>"

• write line• pql escape line

• (note space before /FROM)

Page 8: Email Merger By Dave Doulton University of Southampton.

Subprocedures

• Subprocedures are used to do common tasks such as enabling buttons based on checks of other fields on the dialog.

Page 9: Email Merger By Dave Doulton University of Southampton.

UPSET & UPGET

• UPSET stores a value in the ini file• compute dummy=

upset("mailconf",gettxt(id_conf))• UPGET gets it back• compute fn=upget('mailconf')

• note - these do not work in batch

Page 10: Email Merger By Dave Doulton University of Southampton.

Multiple programs in dialog

• Multiple programs in the footer of a dialog

• Once the dialog has done its work it can then activate other programs as required

• this can be controlled by CIF

Page 11: Email Merger By Dave Doulton University of Southampton.

CIF

• When the merge button is pressed global variable go is set to MERGE

• cif eq "<go>","MERGE”• …• …• cif end

Page 12: Email Merger By Dave Doulton University of Southampton.

Data Passing

• Data can be passed between programs in global variables

• Especially where they are changing the source of the subsequent programs

Page 13: Email Merger By Dave Doulton University of Southampton.

Demonstration

• The program can be run picking up an old configuration or start with a new one.

• It depends on where the configuration file is stored and whether the program has been run before.

• RUN

Page 14: Email Merger By Dave Doulton University of Southampton.

Summary

• A single pql file can be used to create and send email messages from PC or Unix.

• A sample Unix script to do smtpsend and a PC setup program to install smtpsend are on the CD

• All of you with email addresses will have received and email by this route.

Page 15: Email Merger By Dave Doulton University of Southampton.

The End