I want to show you how to allow less secure apps to access your Yahoo/AOL mail and send an email to the same account using your server application. If you can send an email from and to the same account, you can use it to send any addresses.
Anyways, the same functionality can be used on a Google mail account. In fact, I got it working with a Google mail account before I changed the hard code account info to a Yahoo! Mail account. The reason I did that is security. With Google account, I had to go to my security configuration page to turn on the setting allowing 3rd party application to access my Google mail account. It was a simple switch that you can flip on and off. To me, this was not secure enough.
Yahoo! Mail, on the other hand, uses a more secure way to allow my application to access my own mail account. Then I can get to my security configuration, enable my mail to allow 3rd party application to access. Here comes a twist, instead of a switch where I can turn on/off the mail access, I had to create a separated passcode for the 3rd party application. It is different from Google Mail, which means my primary password does not need to be exposed.
If you use Yahoo / AOL mail, then you need to follow the steps below to allow less secure Apps to access your Yahoo / AOL mail.
Step 1: Login to you mail box
● First, you can login with your user name, then click Next.
Step 2: Account Info
● Go to the upper right corner of the page, and you will find your user name. It is a clickable field.
● In the dropdown, one link is called “Account Info”. Click to access it.
Step 3: Account Security page
● After clicking Account Info, you will be asked to log in again to see the “Account Security” page. Once logged in, you will see the following page.
Step 4: Manage app passwords
● At the very bottom, you will see the “Manage app passwords”. Click it.
Step 5: Generate app passwords
● Enter a meaningful name and click “Generate”. This will generate a pass code and associate with a name. Like this:
● Once you get the passcode, you must write it down somewhere that you can access later, because if you click “Done”, you are never going to see this passcode again. Don’t lose it.
● Once you saved the passcode, click “Done”, you will be all set.
● Use this passcode to configure in Sender password to configure.