openedge - HTML 文件内容到正在进行中的电子邮件正文 4gl
问题描述
我从 Progress 程序创建了一个 .html 文件,其中包含行和列的表。
我想将 HTML 文件的内容添加到我使用 Windows 上的“febooti”电子邮件实用程序发送的电子邮件正文中。
如何使用“febooti”从我的 Progress 程序发送这个 HTML 文件?
解决方案
febooti.com 网站称该工具支持电子邮件正文中的 HTML:
https://www.febooti.com/products/command-line-email/commands/htmlfile/
有很多选项,但一个简单的 4gl 测试示例可能如下所示:
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 )).
推荐阅读
- html - 在反应组件内添加 html 元素
- javascript - 网页向下滚动时如何添加CSS属性?
- express-validator - 为什么 express-validator isAlphanumeric 为空白字段返回 true?
- file - 如何从不同的路径调用二进制文件并打开文件
- java - 错误:从内部类引用的局部变量必须是最终的或有效的最终 Android Java
- flutter - 颤振 - 为拖动 showModalBottomSheet 设置捕捉
- swift - 像在 AsyncImage 中一样将修饰符应用于图像
- django - PersonalInfo 匹配查询不存在
- reactjs - 如何从 axios 的响应中获取价值
- java - UTF-8 字符在流经 kafka 主题时解码错误