Feat/add email support for pro and team (#6533)

This commit is contained in:
crazywoola 2024-07-22 19:56:46 +08:00 committed by GitHub
commit 71a7211411
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 55 additions and 0 deletions

View file

@ -0,0 +1,25 @@
export const generateMailToLink = (email: string, subject?: string, body?: string): string => {
let mailtoLink = `mailto:${email}`
if (subject)
mailtoLink += `?subject=${encodeURIComponent(subject)}`
if (body)
mailtoLink += `&body=${encodeURIComponent(body)}`
return mailtoLink
}
export const mailToSupport = (account: string, plan: string, version: string) => {
const subject = `Technical Support Request ${plan} ${account}`
const body = `
Please do not remove the following information:
-----------------------------------------------
Current Plan: ${plan}
Account: ${account}
Version: ${version}
Platform:
Problem Description:
`
return generateMailToLink('support@dify.ai', subject, body)
}