-3

I have created a .html file from a Progress program which contains a table of rows and columns.

I would like to add the contents of the HTML file to an email body that I am sending with the "febooti" email utility on Windows.

How can I send this HTML file from my Progress program using "febooti"?

Tom Bascom
  • 13,405
  • 2
  • 27
  • 33

1 Answers1

2

The febooti.com website says that the tool supports HTML in the body of the email:

https://www.febooti.com/products/command-line-email/commands/htmlfile/

There are a lot of options but a simple 4gl test example might look something like this:

define variable smtpServer   as character no-undo.
define variable emailFrom    as character no-undo.
define variable emailTo      as character no-undo.
define variable emailSubject as character no-undo.
define variable altText      as character no-undo.
define variable htmlFileName as character no-undo.
define variable htmlContent  as character no-undo.

assign
  smtpServer   = "smtp.server.com"
  emailFrom    = "varun@email.com"
  emailTo      = "someone@email.com"
  emailSubject = "Test email!"
  altText      = "Sorry, your email app cannot display HTML"
  htmlFileName = "test.html"
.

/* this is obviously just an example, according to your question you
 * have already created the HTML and don't actually need to do this
 */

htmlContent = "<table> <tr><td>abc</td></tr> <tr><td>...</td></tr> <tr><td>xyz</td></tr> </table>".

output to value( htmlFileName ).
put unformatted htmlFile skip.
output close.

/* end of stub html file creation - use your real code */

/* this shells out and sends the email using whatever
 * is in htmlFileName as the content
 */

os-command value( substitute( "febootimail -SERVER &1 -FROM &2 -TO &3 -SUBJECT &4 -HTMLFILE &5 -TEXT &6", smtpServer, emailFrom, emailTo, emailSubject, htmlFileName, altText )).
Tom Bascom
  • 13,405
  • 2
  • 27
  • 33