mailto

  • Thread starter Thread starter Jean Pierre Daviau
  • Start date Start date
J

Jean Pierre Daviau

Hi to all and every little gurus,

I was trying this for fun.

this works -> start mailto:[email protected]?subject=o

theese dont:
start mailto:[email protected]?subject=o&body=cookies
start mailto:[email protected]?subject=o&body=cookies

Some clues?


--
Thanks for your attention.

Jean Pierre Daviau
--
Easyphp1.8 with Apache1.3.24
Server version: Apache/2.0.55
Server built: Oct 9 2005 19:16:56
DEVC++, borland 5.5
windows Xp
asus p4 s533/333/133
Intel(R) Celeron (R) CPU 2.00 GHz
Processor Radeon7000 0x5159 agp
http://www.jeanpierredaviau.com
 
In said:
The ampersand & is a special-purpose script character. Use %26
instead.

Also, put in the Title Placeholder set of dbl-quotes "always".
Then you will never get bitten by that particular START problem.
start "" mailto:[email protected]?subject=o
 
Mark V said:
Also, put in the Title Placeholder set of dbl-quotes "always".
Then you will never get bitten by that particular START problem.
start "" mailto:[email protected]?subject=o

Unless the user is unaware and tries to use a batch with the placeholder in
Windows 9x/Me. ;-)
 
In said:
Unless the user is unaware and tries to use a batch with the
placeholder in Windows 9x/Me. ;-)


Got me! <G>
Then again, this is an NTx group. I do not recall if NT4 is an
issue. It's just a "good habit" to adopt in general for later
Windows and START.
 
E.g. something like this

--
setlocal enableextensions enabledelayedexpansion
for /f "tokens=*" %%1 in (cookie.txt) do set XXX=!XXX!%%0D%%0A%%1
if not "%XXX%"=="" (
set XXX=!XXX:~6!
set XXX=!XXX: =%%20!
)
rem echo %XXX%
start "" mailto:[email protected]?body=!XXX!
 
Absolutely amazed and afraid of what I am ignoring on the subject.

Thank you so much.

It is for personnal use only.

JP
 
[top-post moved]
E.g. something like this

--
setlocal enableextensions enabledelayedexpansion
for /f "tokens=*" %%1 in (cookie.txt) do set XXX=!XXX!%%0D%%0A%%1
if not "%XXX%"=="" (
set XXX=!XXX:~6!
set XXX=!XXX: =%%20!
)
rem echo %XXX%
start "" mailto:[email protected]?body=!XXX!

Nice. Is that (%0D and %0A) HTML codes? What about text-based MUAs then? Is
there a way to insert (encoded?) CRLFs in the string?
 
Thanks for your thanks ;)

Here is somewhat improved script - accepts cookie' text
containing "%" and "&" and some other special characters
but not only spaces.

--
setlocal enableextensions enabledelayedexpansion
for /f "tokens=*" %%1 in (cookie.txt) do (
set YYY=%%1
set YYY=!YYY:%%=%%25!
set XXX=!XXX!%%0D%%0A!YYY!
)
if not "%XXX%"=="" (
set XXX=!XXX:~6!
set XXX=!XXX: =%%20!
set XXX=!XXX:^&=%%26!
set XXX=!XXX:^>=%%3E!
set XXX=!XXX:^<=%%3C!
set XXX=!XXX:^|=%%7C!
rem maybe other special chars
)
rem echo %XXX%
start "" mailto:[email protected]?body=!XXX!
 
Nice. Is that (%0D and %0A) HTML codes? What about text-based MUAs then?
Is
there a way to insert (encoded?) CRLFs in the string?

The %0D and %0A is CRLF itself here (so maybe this is
this text-based MUA (Mail User Agent?) you're inquiring
about).

As to HTML, it's text itself but a proper MIME-header is
required to form a valid HTML message; i'm not versed in
mailto url syntax for that case.
 
Eman said:
The %0D and %0A is CRLF itself here (so maybe this is
this text-based MUA (Mail User Agent?) you're inquiring
about).

As to HTML, it's text itself but a proper MIME-header is
required to form a valid HTML message; i'm not versed in
mailto url syntax for that case.

OK, I'll give you following example to illustrate my question:

===========8<===============
c:\>set crlf_test=a%0D%0Ab

c:\>echo %crlf_test%
a%0D%0Ab

c:\>echo %crlf_test%>c:\temp\crlf_test.txt

c:\>type c:\temp\crlf_test.txt
a%0D%0Ab

c:\>
===========8<===============

If %0D%0A is *just* CRLF, I should get 'a' and 'b' in two lines as an
output, right?..


I'm quite positive that those are HTML encoded symbols just like %20 is a
space.

Funny that it works in my Outlook Express even though it is set to read and
compose all messages in plain text by default. But there are many true
text-based MUAs out there (you're right it stands for Mail User Agent or
just e-mail client program) like for example BLAT that I use to send
notifications and e-mails from scripts. So I was wondering if that would
work for them.
 
OK, I'll give you following example to illustrate my question:

===========8<===============
c:\>set crlf_test=a%0D%0Ab

c:\>echo %crlf_test%
a%0D%0Ab

c:\>echo %crlf_test%>c:\temp\crlf_test.txt

c:\>type c:\temp\crlf_test.txt
a%0D%0Ab

c:\>
===========8<===============

If %0D%0A is *just* CRLF, I should get 'a' and 'b' in two lines as an
output, right?..

I doubt it's possible to give a multi-line value to an
environment variable in a batch script, but i'm not sure
it's not possible. Also i'm not sure it would work as expected.
I'm quite positive that those are HTML encoded symbols just like %20 is a
space.
Aha.

Funny that it works in my Outlook Express even though it is set to read
and compose all messages in plain text by default. But there are many true
text-based MUAs out there (you're right it stands for Mail User Agent or
just e-mail client program) like for example BLAT that I use to send
notifications and e-mails from scripts. So I was wondering if that would
work for them.

The value of "body=.." part in the mailto url is just a plain
text with special characters encoded. At this point i still don't
understand exactly what you mean. What i think is, a command-line
mailer like BLAT anyhow provides even greater flexibility with its
native command-line syntax.
 
Eman said:
I doubt it's possible to give a multi-line value to an
environment variable in a batch script, but i'm not sure
it's not possible. Also i'm not sure it would work as expected.


The value of "body=.." part in the mailto url is just a plain
text with special characters encoded. At this point i still don't
understand exactly what you mean. What i think is, a command-line
mailer like BLAT anyhow provides even greater flexibility with its
native command-line syntax.
Eman,

BLAT anyhow provides even greater flexibility with its native command-line
syntax.
Yes you right, blat does not need such techniques as discuseed here to send
multi-line messages. It was just example, maybe bad one, of text-only MUA.
At this point i still don't understand exactly what you mean.
Now, what I mean is that plain text is plain text so there's nothing to
encode. Any program that parces this text as plain will interpret these
encoded characters literally like this:

first%20line%0D%0Asecond%20line

Only programs that will threat this text as HTML will produce expected
output:

first line
second line

I hope now my point is clear.

P.S. I find it rather ironic that two Russians (I take it you're Russian
because of your MUA's message header "Ñообщил/Ñообщила в новоÑÑ‚ÑÑ…") are
trying to communicate in English and it seems that it doesn't work out too
well :-)
 
Alexander Suhovey said:
Yes you right, blat does not need such techniques as discuseed here to
send multi-line messages. It was just example, maybe bad one, of text-only
MUA.

Now, what I mean is that plain text is plain text so there's nothing to
encode. Any program that parces this text as plain will interpret these
encoded characters literally like this:

first%20line%0D%0Asecond%20line

Only programs that will threat this text as HTML will produce expected
output:

first line
second line

I hope now my point is clear.

I think "text as HTML" is unsuitable slang here, "MIME-encoding"
would be less confusing. I still don't understand exactly what
you mean with reference to "text-only MUAs". Mailto url scheme is
described in RFC 2368, that's a common thing not related to a
particular [kind of] mail client / agent software. Of course, some
clients just might not be able to implement some features of this
scheme.
P.S. I find it rather ironic that two Russians (I take it you're Russian
because of your MUA's message header "Ñообщил/Ñообщила в новоÑÑ‚ÑÑ…") are
trying to communicate in English and it seems that it doesn't work out too
well :-)

Yeah, this is Russian mindset feature. Other people asks "how
can i accomplish this and that" without beating around the bush,
but those Russians like this heartfelt philosophical talking ;))
 
-----Original Message-----
From: Eman [mailto:[email protected]]
Posted At: Friday, October 13, 2006 2:00 PM
Posted To: microsoft.public.win2000.cmdprompt.admin
Conversation: mailto
Subject: Re: mailto

"Alexander Suhovey" <[email protected]> ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ × ÎÏ×ÏÓÔÑÈ
ÓÌÅÄÕÀÝÅÅ: (e-mail address removed)...
Yes you right, blat does not need such techniques as discuseed here to
send multi-line messages. It was just example, maybe bad one, of text-only
MUA.

Now, what I mean is that plain text is plain text so there's nothing to
encode. Any program that parces this text as plain will interpret these
encoded characters literally like this:

first%20line%0D%0Asecond%20line

Only programs that will threat this text as HTML will produce expected
output:

first line
second line

I hope now my point is clear.

I think "text as HTML" is unsuitable slang here, "MIME-encoding"
would be less confusing. I still don't understand exactly what
you mean with reference to "text-only MUAs". Mailto url scheme is
described in RFC 2368, that's a common thing not related to a
particular [kind of] mail client / agent software. Of course, some
clients just might not be able to implement some features of this
scheme.
P.S. I find it rather ironic that two Russians (I take it you're Russian
because of your MUA's message header "ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ × ÎÏ×ÏÓÔÑÈ") are
trying to communicate in English and it seems that it doesn't work out too
well :-)

Yeah, this is Russian mindset feature. Other people asks "how
can i accomplish this and that" without beating around the bush,
but those Russians like this heartfelt philosophical talking ;))
Mailto url scheme is described in RFC 2368 <<
A-ha! This answers all my questions. I just didn't know how or what
exactly to ask. On the other hand, if I knew, I wouldn't ask... Thanks.
 
Back
Top