Email was designed back when computers did not have a permanent, fast network connection to each other, on the model of postal mail. When you send an email, it gets sent to a server, which sends it to another server, and so on until the email reaches its destination. The oldest mail systems had local delivery, then there were systems where the email had to specify the list of relays until the destination, and nowadays the emails are routed automatically over networks where pretty much all computers can reach each other most of the time. Still, email remains a mail service, not an instant message service. If email is delayed on the way, for example because of a temporary network outage, the intermediate server will keep the email in reserve until the link is restored.
Due to this design, email is asynchronous. All the
mailx command does is to transmit the email to a local MTA. A return code from
mailx indicating success indicates that the local MTA has accepted the job of delivering the email. At that point, the email has been sent successfully. After that, it's the MTA's job to send the email to its destination. If the MTA is unable to make good on its promise to deliver, it is supposed to send a bounce message to the user who sent the email.
You cannot know for sure whether the email has been delivered to the recipient's inbox, and even that isn't useful (for example, what if the email is successfully delivered, then the computer where the inbox is stored burns in a fire?). If you need to know whether the recipient received the email, the only sure-fire way is to include human-readable instructions to acknowledge the email. (There are ways to automatically send a receipt when the email is opened in certain software, but they only work in compatible software, and they aren't reliable either, e.g. if the recipient's computer crashed immediately after opening the email.)
Knowing whether the email has been delivered doesn't tell you anything about whether other people have been able to read it. Unlike physical objects, electronic messages don't really “deviate”: they are copied, and if there are extra copies around, this cannot be detected. If the email needs to be confidential, encrypt it.