-1

In my application I want to send email programmatically with out user intervention. I have googled alot and came up with some helpful links given below. But none of them are working for me.

For all of given links:

 protected PasswordAuthentication getPasswordAuthentication() {   
 return new PasswordAuthentication(user, password);   

These lines are not working with error "return type is incompatible" and "constructor is undefined". Can someone help me to fix the. I have added the required Jar files as well.

link1

link2

Link3

Community
  • 1
  • 1
MajorGeek
  • 495
  • 1
  • 13
  • 31

1 Answers1

0

Add below lines to your Import.

import javax.mail.PasswordAuthentication;
Rida Shahid
  • 386
  • 7
  • 22