I am new to cockpit and have been struggleling with my mailer. I have been through old answers and set up a config.yaml mailer. it looks like this
‘mailer’:
‘from’ : ‘foo@domain.dk’,
‘from_name’ : ‘foo’,
‘transport’ : ‘smtp’,
‘host’ : ‘send.one.com’,
‘user’ : ‘emailuser’,
‘password’ : ‘emailpassword’,
‘port’ : 465,
‘auth’ : true,
‘encryption’ : starttls
In the examples from this forum the mailer has no ‘’ but if I remove them, the fetch itselves doesnt work. this is how my fetch look.
fetch(${domain}/api/forms/submit/kontaktarne?token=${apiKey}
, {
method: ‘post’,
headers: { ‘Content-Type’: ‘application/json’ },
body: JSON.stringify({
form: {
Navn: ${document.querySelector('#navn').value}
,
Adresse: ${document.querySelector('#address').value}
,
Postnummer: ${document.querySelector('#postnummer').value}
,
By: ${document.querySelector('#by').value}
,
Telefon: ${document.querySelector('#tel').value}
,
Email: ${document.querySelector('#email').value}
,
Besked: ${document.querySelector('#message').value}
}
})
})
.then(entry => entry.json())
.then(entry => {console.log(entry)})
please help me understand what i am doing wrong