Closed jaaneh closed 2 months ago
@jaaneh sorry for that, i'll update the document. for self-hosted version you should pass the url as well, it will be the url of the hosted solution.
Lemme know if that fixes the issue
@KMKoushik that seems to work, yeah. Thanks! Was just a tad confused reading the SDK needing an object passed.
Any clue why I may be getting this? BadRequestException: 1 validation error detected: Value at 'content.simple.body.text.data' failed to satisfy constraint: Member must not be null
Sending same payload as above
@jaaneh this issue will be fixed in upcoming release, as interim just pass text variable while sending email.
// Simplified example
const { error } = await unsend.emails.send({
from: "mail@domain.com",
to: "my@email.com",
subject: "Subject",
html: "<h1>Hello!</h1>",
text: "hello"
})
sorry again!
@KMKoushik works like a charm. thanks so much! I'll see if I can contribute some to docs in the coming days :-)
@jaaneh legend! thank you.
closing this in favour of #49
Docs shows you should init Unsend SDK with
new Unsend({ apiKey: "<key>" })
however the constructor only accepts a string:Unsend(key?: string | undefined, url?: string):
This logs this:
I am using the API token which was generated in the dashboard in developer settings tab. Both the domain and SES have been verified