Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
After see react-email and svelte-email, i took the decision to build the same idea but for vue 😀, there you can design email templates using vue3 and render them to HTML or simple text.
It's so simple as install the package in your project:
npm install vue-email
yarn add vue-email
pnpm install vue-email
Vue Email provides you a series of components to build a email template
src/components/template-email.vue
<template>
<e-html lang="en">
<e-text>Hello, {{ user }}!</e-text>
<e-hr />
<e-button href="vuejs.org">Visit vue</e-button>
</e-html>
</template>
<script setup>
import { EButton, EHr, EHtml, EText } from 'vue-email';
import { ref } from 'vue';
const user = ref('Dave');
</script>
This basic example uses Nodemailer and Nuxt 3 to send email. You easily can use other email service provider.
In this example i pass the template by params in a request.
email.post.ts
import nodemailer from 'nodemailer';
export default defineEventHandler(async (event) => {
const body = await readBody(event);
const testAccount = await nodemailer.createTestAccount();
const transporter = nodemailer.createTransport({
host: process.env.HOST || 'smtp.ethereal.email',
port: 587,
secure: false,
auth: {
user: testAccount.user,
pass: testAccount.pass,
},
});
const options = {
from: 'you@example.com',
to: 'user@gmail.com',
subject: 'hello world',
html: body.template,
};
const info = await transporter.sendMail(options);
return { messageId: info.messageId, previewUrl: nodemailer.getTestMessageUrl(info) as string };
});
You can see the full example here
You can see the documentation here
You can see the components, listed below:
Emails built with vue-email can be converted into HTML or plain text, and sent using any email service provider. You can see examples here:
This project is originally written in react (react-email) by:
FAQs
💌 Write email templates with Vue
The npm package vue-email receives a total of 2,167 weekly downloads. As such, vue-email popularity was classified as popular.
We found that vue-email demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.