Error 501 simply states that your SMTP server does not like the parameters you provided in your conversation with it. It could be because you did not provide the subject?? Perhaps you may like to find out from your ISP what the SMTP server is expecting and provide all the information it needs. When we send the example email send program we receive the complete email with To:, From: and Subject: all intact.