Sending emails to multiple receipents with built-in SendMail function
hi,
I am using testcomplete's built-in SendMail function to send emails via the scripts.
SendMail(ToAddress, FromHost, FromName, FromAddress, Subject, Body, FileName1, FileName2..FileNameN);
The problem is when I write more than one email to ToAddress section it fails.
According to documentation; "You can specify several addresses separated by commas or semicolons."
I tried to write recipient's emails by using separation methods as "," or ";" or "\," or "\;",
let ToAddress = "receipent1@company.com , receipent2@company.com" ;
let ToAddress = "receipent1@company.com"+ "," +"receipent2@company.com" ;
let ToAddress = "receipent1@company.com"+ ";" +"receipent2@company.com" ;
let ToAddress = "receipent1@company.com ; receipent2@company.com" ;
When I send an email to one recipient it works.
function send_Mail() {
SendMail("receipent1@company.com ", "smtp.companyhost.com", "FromSenderTester", "senderEmail@company.com", "Subject test email", "Body Test email")
}
But when I try to send it to more than one recipient it fails.
Not Work!
function send_Mail() {
SendMail("receipent1@company.com , receipent1@company.com", "smtp.companyhost.com", "FromSenderTester", "senderEmail@company.com", "Subject test email", "Body Test email")
}
https://support.smartbear.com/testcomplete/docs/reference/program-objects/builtin/sendmail.html