curl-users
Re: cURL cmd line smtp email: MAIL From / RCPT To / Subject / Body empty
Date: Sat, 15 Mar 2014 11:49:42 +0100
Am 14.03.2014 17:36, schrieb Dan Fandrich:
> On Fri, Mar 14, 2014 at 12:45:17PM +0100, ld2nd wrote:
>> [...]
> curl expects a RFC 5322 formatted e-mail as input, not just the body
> part. The application is responsible for creating all the required headers
> in the required format itself.
>
>>>> Dan
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-users
> FAQ: http://curl.haxx.se/docs/faq.html
> Etiquette: http://curl.haxx.se/mail/etiquette.html
>
Hello Dan,
thank you very much fot that hint. With that info I could solve my task.
It took me certain time to drill my script for a working RFC 5322
formatted output, but now it's working fine.
Since I'm creating the script as a batch job for a windows server, I had
to figure out several windows specific stuff. In case someone else
struggles with this problem, here is (little OT) some additional info:
echo some text >outputfile.txt
always places an extra space followed by CR/LF at the line end. So each
line looks like (hex) 20 0d 0a. Very annoying. I could not find a way to
work around this only with the features of a batch shell. My solution is
using sed from the GNU utilities for Win32 like this:
sed "s/\x20*$/\x0d/" input.txt >output.txt
Again, thanks a lot for your support,
LD
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-03-15