The sendmail request allows to send arbitrary e-mails.
Since this is effectively an open e-mail gateway, this must only be used in places where the end user can be identified. For anonymous contact forms, use submit requests.
To use sendmail, an account must have the sendmail
flag:
Every end user should be given a separate account to track abuse.
Sends an e-mail using the server's sendmail
program. The MAIL text must be a properly formatted MIME message.
Using Backend.js, a mail can be sent as follows:
const backend = new Backend('https://viereck.ch/backend'); const account = backend.account('your-account-id', '44705748... your-account-key'); const mail = `From: ali@some-domain.com To: oskar@some-domain.com Subject: Hello This is a test email.`; account.sendmail(mail, onDone, onError); function onDone(request) { ... } function onError(errorCode, request) { ... }