Sending Emails from Edge Functions

Hi everyone, I say you created a wonderful video on sending functions from express using edge functions. I am wondering how one could send emails from other SMTP providers?

Since you can't install dependencies (I think) for your edge functions, you couldn't do something like this (recommended by Brevo):

npm i @getbrevo/brevo --save

const SibApiV3Sdk = require('@getbrevo/brevo');

let apiInstance = new SibApiV3Sdk.AccountApi();

apiInstance.setApiKey(SibApiV3Sdk.AccountApiApiKeys.apiKey, 'YOUR API KEY')

apiInstance.getAccount().then(function(data) {
console.log('API called successfully. Returned data: ' + JSON.stringify(data));

}, function(error) {
console.error(error);
});

1) Is there some way to use npm to install your own dependencies for your edge functions?

2) Something else i'm not thinking of?
Was this page helpful?