hi Richard,
The best approach to debug is to run the NetDemo exe on the same machine. Then use the SendMail procedure in that, filling in all the settings as in your program. The advantage with this procedure is that it has a "Log" tab so you can see the conversation between the program and the server.
The error number (534-5.7.14) suggests a server side error, and more information may appear in the log.
cheers
Bruce