import nodemailer from "nodemailer";
type Smtp = {
host: string;
port: number;
user: string;
password: string;
};
type Base64 = string
export async function main(
smtp: Smtp,
screenshot: Base64,
kind: 'pdf' | 'png',
to_email: string,
from_email: string,
app_path: string,
) {
const transporter = nodemailer.createTransport({
host: smtp.host,
port: smtp.port,
secure: true,
auth: {
user: smtp.user,
pass: smtp.password,
},
});
const fullAppPath = Bun.env["WM_BASE_URL"] + '/apps/get/' + app_path + '?workspace=' + Bun.env["WM_WORKSPACE"]
return await transporter.sendMail({
from: from_email,
to: to_email,
subject: "App report of " + app_path,
html: "<p>App report of <a href='" + fullAppPath + "'>" + app_path + "</a></p>",
attachments: [
{
filename: "report." + kind,
content: Buffer.from(screenshot, "base64"),
},
],
});
}
Submitted by hugo697 100 days ago
import nodemailer from "nodemailer";
type Smtp = {
host: string;
port: number;
user: string;
password: string;
};
type Base64 = string
export async function main(
smtp: Smtp,
screenshot: Base64,
kind: 'pdf' | 'png',
to_email: string,
from_email: string,
app_path: string,
) {
const transporter = nodemailer.createTransport({
host: smtp.host,
port: smtp.port,
secure: true,
auth: {
user: smtp.user,
pass: smtp.password,
},
});
const fullAppPath = Bun.env["WM_BASE_URL"] + '/apps/get/' + app_path + '?workspace=' + Bun.env["WM_WORKSPACE"]
return await transporter.sendMail({
from: from_email,
to: to_email,
subject: "App report of " + app_path,
html: "<p>App report of <a href='" + fullAppPath + "'>" + app_path + "</a></p>",
attachments: [
{
filename: "report." + kind,
content: Buffer.from(screenshot, "base64"),
},
],
});
}
Submitted by hugo697 272 days ago
import nodemailer from "nodemailer";
type Smtp = {
host: string;
port: number;
user: string;
password: string;
};
export async function main(
smtp: Smtp,
pdf: string,
to_email: string,
from_email: string,
app_path: string
) {
const transporter = nodemailer.createTransport({
host: smtp.host,
port: smtp.port,
secure: true,
auth: {
user: smtp.user,
pass: smtp.password,
},
});
return await transporter.sendMail({
from: from_email,
to: to_email,
subject: "App report of " + app_path,
text: "App report of " + app_path + "\n\n",
attachments: [
{
filename: "report.pdf",
content: Buffer.from(pdf, "base64"),
},
],
});
}
Submitted by hugo697 380 days ago
import nodemailer from "nodemailer";
type Smtp = {
host: string;
port: number;
user: string;
password: string;
};
type Base64 = string
export async function main(
smtp: Smtp,
screenshot: Base64,
kind: 'pdf' | 'png',
to_email: string,
from_email: string,
app_path: string,
) {
const transporter = nodemailer.createTransport({
host: smtp.host,
port: smtp.port,
secure: true,
auth: {
user: smtp.user,
pass: smtp.password,
},
});
const fullAppPath = Bun.env["WM_BASE_URL"] + '/apps/get/' + app_path + '?workspace=' + Bun.env["WM_WORKSPACE"]
return await transporter.sendMail({
from: from_email,
to: to_email,
subject: "App report of " + app_path,
html: "<p>App report of <a href='" + fullAppPath + "'>" + app_path + "</a></p>",
attachments: [
{
filename: "report." + kind,
content: Buffer.from(screenshot, "base64"),
},
],
});
}
Submitted by hugo697 384 days ago
import nodemailer from "nodemailer";
type Smtp = {
host: string;
port: number;
user: string;
password: string;
};
export async function main(
smtp: Smtp,
pdf: string,
to_email: string,
from_email: string,
app_path: string
) {
const transporter = nodemailer.createTransport({
host: smtp.host,
port: smtp.port,
secure: true,
auth: {
user: smtp.user,
pass: smtp.password,
},
});
return await transporter.sendMail({
from: from_email,
to: to_email,
subject: "App report of " + app_path,
text: "App report of " + app_path + "\n\n",
attachments: [
{
filename: "report.pdf",
content: Buffer.from(pdf, "base64"),
},
],
});
}
Submitted by hugo697 389 days ago
import nodemailer from "nodemailer";
type Smtp = {
host: string;
port: number;
user: string;
password: string;
};
export async function main(
smtp: Smtp,
pdf: string,
to_email: string,
from_email: string,
app_path: string
) {
const transporter = nodemailer.createTransport({
host: smtp.host,
port: smtp.port,
secure: true,
auth: {
user: smtp.user,
pass: smtp.password,
},
});
return await transporter.sendMail({
from: from_email,
to: to_email,
subject: "App report of " + app_path,
text: "App report of " + app_path + "\\n\\n",
attachments: [
{
filename: "report.pdf",
content: Buffer.from(pdf, "base64"),
},
],
});
}
Submitted by hugo697 389 days ago