mirror of
https://github.com/langgenius/dify.git
synced 2026-07-23 13:05:55 -04:00
a84c2d36a3
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
29 lines
806 B
TypeScript
29 lines
806 B
TypeScript
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,
|
|
supportEmailAddress?: 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(supportEmailAddress || 'support@dify.ai', subject, body)
|
|
}
|