一個發送電子郵件的代碼,希望對大家有用,
也對自己以後參考參考。
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.