Unable to send an email containing report Module 23 TestNg DataDiven Framework | Selenium Forum
K
kaivalyakumar patel Posted on 19/10/2018
Hi Ashishji, 
I am trying to implement the send an email functionality using the code provided. I am getting below error. How I can fix it. 


javax.mail.MessagingException: Could not connect to SMTP host: smtp.mail.yahoo.com, port: 25;
nested exception is:


I have attached the error log and code I have developed. Just FYI, I have commented XSLT report's code due I am not using. 
Please let me know what should I do. 

Thank You in advance
Kaivalya 

K
kaivalyakumar patel Replied on 19/10/2018

I have attached the code here. 


A
Ashish Thakur Replied on 23/10/2018

Try port 465 or 587.