Exception in thread main javax.mail.AuthenticationFailedException | Selenium Forum
A
amruta.markhedkar Posted on 29/04/2020

Hi Ashish, 

1. Extent Reports getting generated along with screenshots in a folder with the timestamp
2. Able to zip the folder
3. Need to attach the zip and send email >> this is failing

 

Initially, was trying with gmail id but then found that gmail is failing for AUTH, so trying with company id but then also there is no luck. 

 

Earlier, was getting the below error, 

Exception in thread "main" javax.mail.SendFailedException: Invalid Addresses;
nested exception is:
com.sun.mail.smtp.SMTPAddressFailedException: 553 5.7.1 <Admin@[10.200.0.28]>: Sender address rejected: not owned by user amruta@synergytop.com

Have changed the smtp host and port to required values

Then have changed/ degraded the java mail api version from 

<!-- https://mvnrepository.com/artifact/javax.mail/javax.mail-api -->

<dependency>

    <groupId>javax.mail</groupId>

    <artifactId>javax.mail-api</artifactId>

    <version>1.6.2</version>

</dependency>

to

<!-- Java mail api -->

<dependency>

<groupId>javax.mail</groupId>

<artifactId>mail</artifactId>

<version>1.4</version>

</dependency>

 

which is used in the recorded videos. 

 

Please help. Stuck with this from past 2 days. Have taken more than enough time. Your guidance is required asap.

 

Thanks,

Amruta

 


A
Ashish Thakur Replied on 29/04/2020

" Sender address rejected: not owned by user amruta@synergytop.com"

This is error. Your COmpany mail server is not allowing. You need to talk to them


A
amruta.markhedkar Replied on 29/04/2020

Hi Ashish, 

 

Tried with gmail as well but then getting the following error.

Exception in thread "main" javax.mail.AuthenticationFailedException
at javax.mail.Service.connect(Service.java:306)
at javax.mail.Service.connect(Service.java:156)
at com.trimarkportal.philzcoffee.mail.Mail.sendEmail(Mail.java:71)
at com.trimarkportal.philzcoffee.mail.ZipAndSendMail.main(ZipAndSendMail.java:56)

 

Please guide.

 

Thanks,

Amruta

 


A
Ashish Thakur Replied on 29/04/2020

Please contact your company's IT guys for the mail configuration.


Related Posts