Varind,
I have tested your last email code posted, with the improved top constants.
After test sending email by Telnet with my mail server, and learning what my authentication problems were, I tweaked things a bit to match my requirements, and its working perfectly.
Thanks for sharing your code.
If anyone else is struggling to get their email code to send, please take a look at this Telnet guide
https://www.wikihow.com/Send-Email-Using-Telnet. After you succeed at the telnet, you will understand the command sequence, your command success, step by step.
And this SMTP commands guide
http://www.samlogic.net/articles/smtp-c ... erence.htm helped me polish my From line.