sendEmail
public static void sendEmail()
throws Exception
Sends automated email with attached TestNg HTML Report.
config.properties file, if "emailExecutionFlag" key is set as true then only the Email logic will work else it won't.
config.properties file, Under "Email properties" section, all keys(like: subject, from, to, attachments, and so on) needs to be properly configured for sending Email.
If unable to execute this code due to Authentication issues then try either of following:
1. For specific device: go to https://myaccount.google.com/security#activity for your account and add the device as trusted device
2. For any device: go to https://www.google.com/settings/security/lesssecureapps and allow less secure apps to send emails
- Throws:
Exception
- the exception