cURL / Mailing Lists / curl-library / Single Mail


Re: SMTP recipient issues

From: William Betts <>
Date: Thu, 7 Jun 2012 16:26:35 -0700

On Thu, Jun 7, 2012 at 9:00 AM, Steve Holme <> wrote:
> HI Dan,
>> Another alternate (simple and rather crude) solution might be
>> to mimic mail servers in that curl could do "bookkeeping" of
>>  the unsent addresses and send an "undeliverable mail"
>> email to the return address (if it isn't <>) for the unsent
>> addresses.
> That's kind of the problem I have when testing against my Exchange server as
> it replies with a 250 for all addresses and then Exchange will send a
> non-delivery report to the sender for any mailboxes that didn't exist.
>> I'm not sure that is at all desirable - since curl isn't a mail
>> server that can't finish a delivery, but rather a client who
>> cannot start one.
> I believe it is outside libcurl's realm to do this - especially as the
> application programmer would then need to implement a POP3 connection in
> order to get the non-delivery reports and parse them, etc... etc..
> The other thing you could do is to loop round in your code calling libcurl,
> sending the same email (except for a line or two of header information) with
> one address at a time rather than putting all recipients in the recipient
> list. That puts more load on the server as you would essentially be sending
> the same email body multiple times but at least you are guaranteed to get a
> unique response back for recipient.
> I would recommend you do this in the short term if you can, because any fix
> to libcurl is going to take some time to implement, review, test, push to
> the repository and release (unless you are prepared to build the library
> from source yourself when a patch is available). I would like to get a fix
> into v7.27.0 but this isn't scheduled for release for approximately 6 weeks
> :(
> Cheers
> Steve
> -------------------------------------------------------------------
> List admin:
> Etiquette:

I agree that libcurl shouldn't be producing bounce reports. I'm still
trying to think of the best way to come up with this. Right now I'm
thinking that that we should just maintain an internal list of the bad
email addresses that can be retrieved. At first I thought about using
a callback that would pass the bad addresses to it, but I'm not really
sure how everyone would feel about adding in another curl option. If
that is a possible solution that everyone is okay with let me know.

Best Regards,

List admin:
Received on 2012-06-08