mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
Email sending tool (#3837)
### What problem does this PR solve? _Briefly describe what this PR aims to solve. Include background context that will help reviewers understand the purpose of the PR._ Added the function of sending emails through SMTP Instructions for use- Corresponding parameters need to be configured Need to output upstream in a fixed format  ### Type of change - [√] New Feature (non-breaking change which adds functionality) --------- Co-authored-by: Kevin Hu <kevinhu.sh@gmail.com>
This commit is contained in:
@ -8,6 +8,7 @@ import { ReactComponent as ConcentratorIcon } from '@/assets/svg/concentrator.sv
|
||||
import { ReactComponent as CrawlerIcon } from '@/assets/svg/crawler.svg';
|
||||
import { ReactComponent as DeepLIcon } from '@/assets/svg/deepl.svg';
|
||||
import { ReactComponent as DuckIcon } from '@/assets/svg/duck.svg';
|
||||
import { ReactComponent as EmailIcon } from '@/assets/svg/email.svg';
|
||||
import { ReactComponent as ExeSqlIcon } from '@/assets/svg/exesql.svg';
|
||||
import { ReactComponent as GithubIcon } from '@/assets/svg/github.svg';
|
||||
import { ReactComponent as GoogleScholarIcon } from '@/assets/svg/google-scholar.svg';
|
||||
@ -25,6 +26,8 @@ import { ReactComponent as WenCaiIcon } from '@/assets/svg/wencai.svg';
|
||||
import { ReactComponent as WikipediaIcon } from '@/assets/svg/wikipedia.svg';
|
||||
import { ReactComponent as YahooFinanceIcon } from '@/assets/svg/yahoo-finance.svg';
|
||||
|
||||
// 邮件功能
|
||||
|
||||
import { variableEnabledFieldMap } from '@/constants/chat';
|
||||
import i18n from '@/locales/config';
|
||||
|
||||
@ -87,6 +90,7 @@ export enum Operator {
|
||||
Crawler = 'Crawler',
|
||||
Invoke = 'Invoke',
|
||||
Template = 'Template',
|
||||
Email = 'Email',
|
||||
}
|
||||
|
||||
export const CommonOperatorList = Object.values(Operator).filter(
|
||||
@ -127,6 +131,7 @@ export const operatorIconMap = {
|
||||
[Operator.Crawler]: CrawlerIcon,
|
||||
[Operator.Invoke]: InvokeIcon,
|
||||
[Operator.Template]: TemplateIcon,
|
||||
[Operator.Email]: EmailIcon,
|
||||
};
|
||||
|
||||
export const operatorMap: Record<
|
||||
@ -259,6 +264,7 @@ export const operatorMap: Record<
|
||||
[Operator.Template]: {
|
||||
backgroundColor: '#dee0e2',
|
||||
},
|
||||
[Operator.Email]: { backgroundColor: '#e6f7ff' },
|
||||
};
|
||||
|
||||
export const componentMenuList = [
|
||||
@ -358,6 +364,9 @@ export const componentMenuList = [
|
||||
{
|
||||
name: Operator.Invoke,
|
||||
},
|
||||
{
|
||||
name: Operator.Email,
|
||||
},
|
||||
];
|
||||
|
||||
const initialQueryBaseValues = {
|
||||
@ -580,6 +589,18 @@ export const initialTemplateValues = {
|
||||
parameters: [],
|
||||
};
|
||||
|
||||
export const initialEmailValues = {
|
||||
smtp_server: '',
|
||||
smtp_port: 587,
|
||||
email: '',
|
||||
password: '',
|
||||
sender_name: '',
|
||||
to_email: '',
|
||||
cc_email: '',
|
||||
subject: '',
|
||||
content: '',
|
||||
};
|
||||
|
||||
export const CategorizeAnchorPointPositions = [
|
||||
{ top: 1, right: 34 },
|
||||
{ top: 8, right: 18 },
|
||||
@ -660,6 +681,7 @@ export const RestrictedUpstreamMap = {
|
||||
[Operator.Note]: [],
|
||||
[Operator.Invoke]: [Operator.Begin],
|
||||
[Operator.Template]: [Operator.Begin, Operator.Relevant],
|
||||
[Operator.Email]: [Operator.Begin],
|
||||
};
|
||||
|
||||
export const NodeMap = {
|
||||
@ -696,6 +718,7 @@ export const NodeMap = {
|
||||
[Operator.Crawler]: 'ragNode',
|
||||
[Operator.Invoke]: 'invokeNode',
|
||||
[Operator.Template]: 'templateNode',
|
||||
[Operator.Email]: 'emailNode',
|
||||
};
|
||||
|
||||
export const LanguageOptions = [
|
||||
|
||||
Reference in New Issue
Block a user