|
Accepted Code - SMTPmail.p Documentation
This is a 4gl program written by Mario Paranhos and Paul Keary, which uses the 4gl sockets implementation in Version
9.1 / 3.1 to send email directly to an SMTP mail server without requiring a 3rd party API. This
is cross-platform.
Quote from Mario: "Goodbye Blat!"
Other Contributors:
- Geoff Crawford
- Steve Lichtenberg
- Steve Southwell
- Mark Bremmeyr
- Rares Stanciulescu
- Peter Kalmijn
- Jeff Pilant
- Bill Prew
- David Craven
- Scott Ziola
- Peter Graybash III
- Chris Chaney
- Steven Jellin
- Others too numerous to mention...
Current Version: 5.8c
Fixes in 5.8c
[Summary provided by 02/25/2009 Paul Keary:]
-
- Reformat some of long comments to better fit in 80 columns
- Add Optional Preprocessor arguments to allow customization
by including configuration file.
LOGLEVEL, EncodeDirectory and MAILHUB
- Check for FILE-INFO-FILE-TYPE = ? in DoFiles
(INDEX(FILE-INFO:FILE-TYPE,"F") = 0) = NO if FILE-TYPE = ?
- Removed C_PASSWORD from being output to log
- After calling dofiles: if vMessage <> "" need to set
vState = -1 so that Cleanup will output vMessage to the log.
- Fixed bug with PROCESS EVENTS in OE10 replaced with
RUN readhandler.
Solution from peg.com/lists/freeframework/web/msg00582.html
- Fixed bug #1447967 related to removal of b64 file when
DoneWithFiles is called.
- Fixed bug #2449147 related to cThisLine values
Fixes in 5.8b
[Summary provided by 10/03/2007 Jan Keirse:]
-
Change getFile not to return a mempointer but work on mgetfile because it caused a memory leak
Fixes in 5.8a
[Summary provided by 09/08/2007 Tony Benn:]
- Change get-tz procedure to use 'timezone' function for OE10
Fixes in v.5.8:
[Summary provided by 06/07/06 Carl Verbiest CCE NV (cvb)]
- Renamed timezone variable V10.1A keyword to timezonestring
- Added "fake" authentication (solved mail being reported as SPAM by some spamfilters)
- Use session:temp-directory for temp- & logfiles.
- Changed priority and notification based upon RFC2298, RFC1891, Network traffic analysis from Exchange server and a lot of trial and error.
- Replace ~n in body by crlf, not yet fixed for body in file (we use unix2dos prior to sending as a work-around)
- Replace ~n in subject by space
Fixes from v.5.3 to v.5.7a:
- Merged several version together
- Garret Schweitzer's read receipt and delivery receipt
- Laszlo Kohl's SMTP authenticationd
- Derek Marley's "Importance Flag
- Eliminated endless loop: when processing emailtoTMP line with
more than 2 recipientsd
Note: If you want to call this procedure from within a UDF (User Defined Function), then you will need to disable the wait-for.
To do this, find the following section of code:
IF NOT THIS-PROCEDURE:PERSISTENT AND
NOT SESSION:BATCH-MODE THEN WAIT-FOR CLOSE OF THIS-PROCEDURE.
ELSE IF SESSION:BATCH-MODE THEN DO:
And make it look like this:
/*
IF NOT THIS-PROCEDURE:PERSISTENT AND
NOT SESSION:BATCH-MODE THEN WAIT-FOR CLOSE OF THIS-PROCEDURE.
ELSE IF SESSION:BATCH-MODE THEN
*/
DO:
One more note: Please read the Bug reports on this one before trying to customize it.
You may end up duplicating work, or you may end up fixing one, in which case we'd like to
hear from you. Most likely, it will work for you out-of-the-box, but if it doesn't, please
let us know.
Current Version:
[Download smtpmailv5_8c.p]
Old Versions:
[Download smtpmailv5_8b.p]
[Download smtpmailv5_8a.p]
[Download smtpmailv5_8.p]
[Download smtpmail-v5_7a.p] Version 5.7a - 01/07/04
[Download smtpmail-v5_3.zip] (with support files - 23K) Version 5.3 - 01/02/03
[Download smtpmail-v5_2.zip] (Old Version - with support files - 21K) Version 5.2 - 10/04/02
[Download smtpmailv5.1a.p] (Old version - 39K) Release 5.1a - 1/11/02
[Download smtpmailv5.1.p] (Old version - 39K) Release 5.1 - 10/03/01
[Download smtpmailv5.p] (Old version - 39K) Release 5 - 9/22/01
[Download smtpmailv4.p] (Old version - 36K)
[Download smtpmailv3.p] (Older version - 34K)
[Download smtpmailv2.p] (Older version - 20K)
If you want to be able to send attachments, you must download one of these:
[Download b64encode.p] (2k) - Contest Winner
[Download base64encodeV10.p] (2k) - V10 Built-In Encoder courtesy of Dries Feys
[Other base64 encoders]
[Return to Unreviewed Code Section]
[Return to Main Download Page]
|