How to send email from your Next.js project with Loops.
LOOPS_API_KEY
.
Then you can import the Loops SDK client like this:
sendTransactionalEmail()
and include values for each of the data variables you added to your email.
success
boolean telling you if the email was sent successfully. If it was not, you’ll also receive an error message.
updateContact()
method.
updateContact()
can be used as a shortcut “update or create” function. It will create new contacts if the provided email address and/or user ID are not found.contactProperties
object and the expected response from the updateContact
method.
userId
value for users, which should be their unique value in your platform. This allows you to change a contact’s email address in the future, because they have a separate unique identifier in the system.completedOnboarding
, your call would look like this…
return
otherwise the lambda might be terminated before the promise is evaluated.