Help using DenoMailer
i'm trying to use it but i get Deno is not defined when i try to send the email, any tips? how would you approach it?
![No description](https://cdn.answeroverflow.com/1176947120520036422/image.png)
![No description](https://cdn.answeroverflow.com/1176947120838824006/image.png)
8 Replies
I'm sorry, but the documentation does not provide information about DenoMailer. Therefore, I can't provide a specific solution to your problem. However, I can suggest some general debugging steps:
1. Make sure you're running your script with the correct permissions. Deno is secure by default, so network access (like sending an email) is not allowed unless you explicitly allow it. You can do this by adding the
--allow-net
flag when you run your script.
2. Check the version of Deno you're using. Some modules may not work correctly with older versions of Deno. You can check your Deno version by running deno --version
in your terminal.
3. Make sure the module you're importing is compatible with your Deno version. You can usually find this information in the module's documentation or repository.
4. If you're seeing a "Deno is not defined" error, it might be because you're trying to use Deno-specific APIs in a context where they're not available, like a web worker or a frontend script. Make sure you're running your Deno code in a Deno runtime.
Remember, these are general tips and might not solve your specific problem since they are not based on the documentation's information about DenoMailer.You canβt run Deno in the browser
Also, you canβt run any email service on Deno Deploy due to past users abuse that led to emails port restrictions. Use some API like Postmark, or SendGrid to send emails.
^ beat me to it :) i'm not familiar with preact which you seem to be using, but some of these frameworks can get one easily confused where a given code is going to be run, client server or both (SSR vs CSR). that can be particularly worrying in this case, as mail server credentials are embedded in the code
Happy to say the issue is solved. I was realy trying to run at the browser, was confused with it.
also i'm not using with deploy, so its gonna work, thanks!
Good, mark it as solved please π
not sure how i do it..
You modify your initial post, I see that you already have a tag βDeno.*APIβ and add the Message tag with βSolved β
β.
alright, done!