Does anyone knows what is wrong with this code? I'm trying to send a information comingo from a modal form to a mail that the modal form ask.
Here is the code:
function sendEmail() {
Email.send({
Host: "smtp.host.email",
Username : "user@domain.com",
Password : "password",
To : console.log('email: '+ inputEmail.value),
From : "user@domain.com",
Subject : subject,
Body : let results = {
Digestivo: calculateResultInWords(result.D),
Cardiovascular: calculateResultInWords(result.I),
'Salud General': calculateResultInWords(result.C),
Nervioso: calculateResultInWords(result.N),
Inmunológico: calculateResultInWords(result.M),
Respiratorio: calculateResultInWords(result.R),
Urinario: calculateResultInWords(result.U),
Endócrino: calculateResultInWords(result.G),
Estructural: calculateResultInWords(result.E)
};,
}).then(
)
});
I'm trying to send the mail with the result of the form in the body of the mail and to the mail the customer has provided.