curl / Mailing Lists / curl-users / Single Mail

curl-users

Re: Mail received but message body is empty

From: Ray Satiro via curl-users <curl-users_at_cool.haxx.se>
Date: Wed, 21 Jun 2017 02:46:09 -0400

On 6/20/2017 10:26 AM, Dutch Raf via curl-users wrote:
>
> My problem: Mail received but message body is empty
>
>
> I have tried plain text and html format for the --upload-file numerous
> times now, but I can't get the message body to work.
>
> I receive the e-mail, the subject is ok and corresponds to the subject
> in the --upload-file but the message body is ignored. So the e-mail
> does not show any text.
>
>
> I have used the following: (the content of the file is between the
> "-----", the "-----" are not part of the content)
>
>
> -----
>
> From: "server1" <server1_at_domain.com>
> To: "myName" <myemail_at_domain.com>
> Subject: This is a test message from server1
> Content-Type: text/plain; charset="us-ascii"
> Content-Transfer-Encoding: quoted-printable
> MIME-Version: 1.0
>
>
> This should be the e-mail text message,
>
> and this could go on for a couple of lines.
>
>
> .
>
>
> -----
>
>
> the command I used from bash:
>
> curl -v smtp://smtprelay.domain.com --mail-from server1_at_domain.com
> --mail-rcpt myemail_at_domain.com --upload-file ./mailtext.txt
>
>
> Because I receive the mail, something must be wrong with the content
> of the --upload-file ./mailtext.txt.
>

I can't reproduce this. I tested with gmail and I received it ok
several times. I tried a recent version of curl 7.54.1-DEV and an old
version curl 7.39.0. Maybe your mail provider requires content length
header? Check the content of the raw received message for content length

-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2017-06-21