Thorbjørn and symcbean have both provided lots of useful information, but it may be overwhelming in its completeness. I'll try to make it more approachable:
About the worst thing you can do is build an SMTP client into your application and rely on that to send mail to somewhere in the world. A much better solution is to run a "standard" MTA and/or SMTP server on your own box locally or, at worst, inside your own network.
So your app only has to get mail as far as your own mail server, which will hopefully be on port 25 on the same machine. No SSL encoding, no spam filtering, not a bunch of things that can go wrong. Also, if your mail server is on the same machine as your app, they will (usually) either both be down or both up.
Once your app has pushed its mail into your local mail server (which is fast and nearly foolproof), it is that server's problem to get the mail sent to the final destination. On a Linux server you will have something like Sendmail, qmail, exim or postfix installed; on Windows, I don't know.
Any one of those "out of the box" mail servers is highly competent at getting mail out. An automatic repeat is already built in, with retries after (e.g.) 1 hour, 2 hours, 4, 12, 24 and 48 hours. Your mail server will try its darndest to deliver your mail, and will do so with no extra effort on your part. Failed attempts will show up in the mail server's log, and you can analyze that and draw your conclusions. If it fails after the last possible attempt, that is also noted in the log file, and you can conclude that something was wrong on the receiving side. All this power is already built in, and you shouldn't even think of trying to build it into a mail client of your own.
Final note: It's possible for the transfer to be successful physically, i.e. the message was delivered, but then it was treated as spam by the recipient's mail server or client; or the (human) recipient simply deleted it by accident. No software is going to solve that problem with certainty.