Fixed a number of problems with the mailx example program that caused it to fail sending emails. Added the address type to the address structure. Added a required FROM address parameter. Fixed two instances of misuse of the strtok function which prevented correct string parsing. Convert the server, port, user pass, and from parameters to dynamically allocated strings. Remove default server settings and make server a required field.