一个发送电子邮件的代码,希望对大家有用,
也对自己以后参考参考。
You will need to create one class called EmailProgram like below!
And then you will need to have a main class that calls it.
Note that you do need an SMTP server to send out email using this code. There may be free ones there you can use, but I'm not sure.