Avatar

Level 9

I have two textfields for the two Cc email addresses. When I click the button, the Cc addresses end up after the subject. What do I have wrong? 

// Declare the variable
var vEmail;
var vCC = "";

// Check that the email field is not null
if (txtToAddress.rawValue !== null) {
     vEmail = txtToAddress.rawValue;
}
if (ccEmail.rawValue !== null){
vCC = ccEmail.rawValue + ";";
}
if (MEAdminEmail.rawValue !== null){
vCC = vCC +MEAdminEmail.rawValue;
}

// Send email
event.target.submitForm({cURL:"mailto: " + vEmail + "?subject=MAR Assignment" + vCC,cSubmitAs:"PDF",cCharset:"utf-8"});