Hello,
We are trying to send the output of a http-authed page by sendmail. Below is the command:
However, it seems only if we add a --trace-ascii - to the curl command I can get the output to be sent by sendmail. Otherwise the email body is blank.
If the page accessed by CURL is not protected by http-auth then the command
works perfectly. The webpage source is sent in email body.
Any idea how to fix this (FreeBSD 8.1)? I can do other ways (by example output curl content to file and email after) but I prefer to keep the command as simple as possible.
We are trying to send the output of a http-authed page by sendmail. Below is the command:
/usr/local/bin/curl [url]http://www.domain.com/httpauth-protected-page[/url] --basic --user username:apass | /usr/sbin/sendmail [email]email@domain.com[/email]
However, it seems only if we add a --trace-ascii - to the curl command I can get the output to be sent by sendmail. Otherwise the email body is blank.
If the page accessed by CURL is not protected by http-auth then the command
/usr/local/bin/curl [url]http://www.domain.com/non-protected-page[/url] | /usr/sbin/sendmail [email]email@domain.com[/email]
works perfectly. The webpage source is sent in email body.
Any idea how to fix this (FreeBSD 8.1)? I can do other ways (by example output curl content to file and email after) but I prefer to keep the command as simple as possible.