vikranthsanka15
10 years agoOccasional Contributor
New line in Groovy Script.
Hi,
I have to mail the Test results after the Test Suite is run. Im using ActiveXObject for opening the outlook mail ready for sending. I've used the below code for this
But the Body of the Mail is still appearing in single line though I have used \r\n. Is there any other way to use new line feature for this.
I have to mail the Test results after the Test Suite is run. Im using ActiveXObject for opening the outlook mail ready for sending. I've used the below code for this
import org.codehaus.groovy.scriptom.ActiveXObject
def outlook = new ActiveXObject("Outlook.Application")
def oEmail = outlook.CreateItem(0);
oEmail.Recipients.Add("vikranth_sanka@xyz.com");
oEmail.Subject = "SmokeTest";
oEmail.HTMLBody = "Smoke Test done successfully in \r\n xyz and pqr Environments.";
But the Body of the Mail is still appearing in single line though I have used \r\n. Is there any other way to use new line feature for this.