I'm trying to create a script that uses a canned message when run but also attaches or appends the text of the original email. I've modified the vacation script to accomplish most of this, but I'm running into a few issues. I need all of the text of the original email to be appended to the email, including links in HTML. Right now, when an email arrives with a link in it, it will display the link tag but not the link itself. I need the URL to be displayed.

The other way I could accomplish my goal is to just attach the original message to the new email generated by the script. I'm not aware of any way to do this via the Pocoscript references. Is this possible?

One other issue: how do I display a sender name in the from field? Not the email address itself, but the name.

I'll work on the attachment method, but the more I've thought through the scenarios this script is supposed to dealing with, I've concluded that appending the text to the email will probably be the better way to go. The only catch is displaying all the text when appended, including HTML links.

{### Vacation Message
{ A bit more sophisticated, this script will reply to an
{ incoming mail, with a pre-saved template. For this
{ script to run unattended, make sure that in the program
{ settings (F7) under Miscellaneous, Send Queued Messages
{ When Checking Mail is checked.

This AssignStyledBody schemozzle was an interesting academic curiosity -- to me -- but I should not have imposed it on you. I am sorry about that.

The problem is a basic deficiency in PocoMail, namely, that it does not preserve HTML when replying to HTML messages. The only truly satisfactory fulfilment of your requirements, I think, will come when Poco corrects that deficiency. In this matter, breath-holding is not recommended. ;)

Attaching the original message to the reply would be a fairly decent stopgap measure if only you could count on the recipient's emailer being configured to display attachments inline and if .eml files were one of the file types that his emailer displays inline. They do in PocoMail; they don't in Windows Mail.

Regarding ExtractEmail:
Define the variable $Address -- it will look like either "John Doe" <dojo@xxxxxxx.com> or dojo@xxxxxx.com. Then ExtractEmail will extract the email address, dojo@xxxxxx.com, from it. For example,

spamsmasher, you needn't read this post if you don't want to. The subject of using ReadBody with HTML messages came up, and I thought maybe I would include the following comment, a product of bitter experience, in case it can save someone some stress.

{ ReadBody and HTML messages: ReadBody is supposed to remove HTML tags and{ return the text. It has two egregious flaws in this regard (v4.8.0.4400).{ (1) It does not always strip the HTML tags: it does when Content-Type is{ text/html; it does not when Content-Type is multipart/related.{ (2) It sometimes strips text as well as tags (e.g., Google News Alerts).{ The body ends with a CRLF (v4.8.0.4400).