Home > OS >  Java Mail - Sender address: not logged in
Java Mail - Sender address: not logged in

Time:04-12

As my topic revealed, I have been building a email program my problem is when I set my company address as a sender in properties,

I had been told : Sender address rejected: not logged in

But given that I put my password on properties.yaml

here is my properties

enter image description here

You cannot use your gmail password here. You have to generate a new password for this application . Below are the steps to generate the password.

  1. Go to manage gmail account
  2. click on security
  3. first you have to complete 2 step verification.
  4. after completing 2 step verification click on the App password.
  5. in select app section select other and type your application or project name.
  6. click on generate. this will give you a random string.
  7. copy that password and copy in password in properties file.

For outlook account use following steps

To create a new app password for an app or device, take the following steps. You can repeat these steps to create an app password for as many apps or devices as you need.

  1. Go to the Security basics page and sign in to your Microsoft account.

  2. Select More security options.

  3. Under App passwords, select Create a new app password. A new app password is generated and appears on your screen.

  4. Enter this app password where you would enter your normal Microsoft account password in the application.

  • Related