cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: SMTP recipient issues

From: Steve Holme <steve_holme_at_hotmail.com>
Date: Thu, 7 Jun 2012 17:00:05 +0100

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: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-06-07