home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 5 Edit
/
05-Edit.zip
/
epmsmp.zip
/
MAILME.E
< prev
next >
Wrap
Text File
|
1996-05-07
|
1KB
|
47 lines
/*
Here's an EPM macro that invokes Sendmail to send the current file to the
addressee(s) given as an argument (or prompted for, if no argument is
provided - e.g., when used in the EPM 6 toolbar).
Set the my_EMAIL_ADDRESS constant appropriately, here or in your MYCNF.E.
Larry Margolis - MARGOLI at YKTVMV
*/
compile if not defined(SMALL) -- If SMALL not defined, then being separately compiled.
define INCLUDING_FILE = 'MAILME.E'
const
tryinclude 'MYCNF.E' -- Get the user's configuration customizations.
include "english.e"
defmain
'mailme' arg(1)
compile endif
compile if not defined(my_EMAIL_ADDRESS)
const
my_EMAIL_ADDRESS = 'myuserid@local.com'
compile endif
defc MailMe =
universal vTEMP_FILENAME
mail_to = arg(1)
if mail_to = '' then
mail_to = entrybox("Enter list of addressees")
if mail_to = '' then
return
endif
endif
if .modify then
'xcom save /q' vTEMP_FILENAME
if rc then
sayerror ERROR_SAVING_HALT__MSG
return
endif
'sendmail -af' vTEMP_FILENAME '-f' my_EMAIL_ADDRESS mail_to
call erasetemp(vTEMP_FILENAME)
else
'sendmail -af' .filename '-f' my_EMAIL_ADDRESS mail_to
endif