MCPcopy Create free account
hub / github.com/msgbyte/tailchat / stringifyAddress

Function stringifyAddress

server/models/user/mail.ts:21–33  ·  view source on GitHub ↗

* 将地址格式化

(address: SendMailOptions['to'])

Source from the content-addressed store, hash-verified

19 * 将地址格式化
20 */
21function stringifyAddress(address: SendMailOptions['to']): string {
22 if (Array.isArray(address)) {
23 return address.map((a) => stringifyAddress(a)).join(',');
24 }
25
26 if (typeof address === 'string') {
27 return address;
28 } else if (address === undefined) {
29 return '';
30 } else if (typeof address === 'object') {
31 return `"${address.name}" ${address.address}`;
32 }
33}
34
35function getSMTPConnectionOptions(): SMTPConnection.Options | null {
36 if (config.smtp.connectionUrl) {

Callers 1

sendMailMethod · 0.85

Calls 1

joinMethod · 0.80

Tested by

no test coverage detected