There are some issues with your code:
- It's cCc, not cCC
- The cTo and cCc parameters need to be email addresses, not just names or texts
- You can't specify bUI as false, unless you run the code from a trusted context.
Did you check the JS Console for errors?
Hello Try, thanks for the reply.
The below code opens the mail window. The only current problem is that the variable doesn't get expanded.
No errore reported from the JS console.
var mailto= this.getField("FIELD1").value;
cSubject: "MAIL SUBJECT" + mailto,
By this I mean that in the subject field you get only the "MAIL SUBJECT" text, no trace of the mailto variable.
There must be a syntax error somewhere but I cannot find it.
If there are no error messages in the JS console then there's no error in your code.
Could it just be that the field is empty?
PS. You're still using the wrong parameter name. It needs to be "cCc", not "cCC".
Try, you couldn't be more right. In my latest form I forgot to put in a value so there could not possibly be any input in the subject field.
Many thanks for your time, solved.