Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Fixed SENDHTML Doesn't Recognize @CLIP:

Jun
760
16
The help for the SENDHTML command includes the following:

SENDHTML command - Send an HTML-formatted email message
You can use the same approach to send the text content of the clipboard (@CLIP:) or the console (@CON:):

sendhtml [email protected] Party @c:\messages\invitation.txt
sendhtml [email protected] Party @clip:
type myfile.txt | sendmail [email protected] Party @con:

I just tried that with @clip:, and I get an error message:

[TCC33.00.20 | C:\temp]
sendhtml "jay@..." Testing @clip:
TCC: (Sys) The system cannot find the path specified.
"C:\Users\Jay\AppData\Local\Temp\"

In addition, if I try to copy anything to the clipboard after that, it fails. In TCMD I get a popup saying "Clipboard is in use by another program". I just installed version 33 on my laptop, and I get the same result there.

I would like to see SENDMAIL and SENDHTML work not only with @CLIP: but also with all the clipboards (@CLIP1: etc.) and especially all the TMP pseudo character devices (@TMP0: etc.).
 
Yes, I see that it works with SENDMAIL. I must have been testing only with SENDHTML.

Is there any way to use the commands with a multi-line message from the command line? I tried using the escape characters ^n and ^r, but they are just sent literally. Environment variables and functions are expanded, so I can use %@char[10], but that is cumbersome. Is there a reason why the escaped characters are not processed in the message text?
 
Yes, I see that it works with SENDMAIL. I must have been testing only with SENDHTML.

Is there any way to use the commands with a multi-line message from the command line? I tried using the escape characters ^n and ^r, but they are just sent literally. Environment variables and functions are expanded, so I can use %@char[10], but that is cumbersome. Is there a reason why the escaped characters are not processed in the message text?

Escape processing is done by the parser before calling SENDHTML. Using those characters work here -- what is the exact syntax you're using?
 
Here's the command:

*sendmail jay@sage... Test "line 1^nline 2"

And here's the message I receive:

line 1^nline 2

The problem seems to be that ^n is not parsed inside the double quotes, as I see here:

echo "line 1^nline 2"
"line 1^nline 2"

Without the quotes it works:

echo line 1^nline 2
line 1
line 2

This does work, since variables are expanded inside the quotes:

*sendmail [email protected] Test "line 1%@char[10]line 2"

Since the text of the message has to be quoted (unless it's just one word), is there an easy way to effect what ^n would otherwise to? Since I'm doing this in an interactive script, I just had that thought that I could process the message string using

%@replace[^^n,%%%%@char[10],"message text"]

However, perhaps someone will have a simpler suggestion that would work even with a command entered directly on the command line.
 
Ah, it finally occurred to me that perhaps the message text does not have to be quoted, even if it contains spaces, since it is the last material on the command line. Indeed, that works. So all I have to do is omit the quotation marks!

*sendmail jay@sage... Test Line 1^nLine 2
 
Back
Top