curl / Mailing Lists / curl-library / Single Mail

curl-library

Re: Sending email to gmail account

From: Sean MacLennan <seanm_at_seanm.ca>
Date: Tue, 12 Dec 2017 09:15:35 -0500

On Tue, 12 Dec 2017 08:10:37 +0100 (CET)
Daniel Stenberg <daniel_at_haxx.se> wrote:

> On Mon, 11 Dec 2017, Sean MacLennan wrote:
>
> > I played with this some more. It turns out they don't care what is
> > in the To: and From: fields in the header... but the following
> > lines must be of the form <email> :
> >
> > curl_easy_setopt(curl, CURLOPT_MAIL_FROM, RCPT_FROM);
> >
> > recipients = curl_slist_append(recipients, RCPT_TO);
>
> This fact is documented for both the CURLOPT_MAIL_FROM and
> CURLOPT_MAIL_RCPT options.
>
> Do you think we should clarify this fact better in the smtp-mail.c
> example?

Maybe. Here is what I now have:

#define FROM "Sean MacLennan <seanm_at_seanm.ca>"
#define TO "Sean MacLennan <basssam.i.am_at_gmail.com>"
#define RCPT_FROM "<seanm_at_seanm.ca>"
#define RCPT_TO "<basssam.i.am_at_gmail.com>"

The names might be better ;) But it makes it clear that the options are
stricter than the mail heading.

Cheers,
   Sean
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2017-12-12