Send Email Without authentication in java using gmail smtp server and javamail

后端 未结 2 831
南方客
南方客 2021-01-27 07:27

I am using Javamail api and gmail smtp server to send mail in java without giving password. I have using the below code. here i am using javax.mail jar file

           


        
2条回答
  •  南方客
    南方客 (楼主)
    2021-01-27 07:44

    First, the name of the property is "mail.smtp.starttls.enable".

    Second, no, you can't send mail through Gmail without authenticating first, e.g., using your password.

提交回复
热议问题