add smtp to frontend (#2802)

* add smtp to frontend

* left align headers

* just email

* change all to email

* fix test-smtp api

* types

* fix email from and login address handling

---------

Co-authored-by: Aiden McClelland <me@drbonez.dev>
This commit is contained in:
Matt Hill
2025-01-14 17:32:19 -07:00
committed by GitHub
parent 5d759f810c
commit e012a29b5e
21 changed files with 389 additions and 21 deletions

View File

@@ -52,6 +52,11 @@ export const email: Pattern = {
description: "Must be a valid email address",
}
export const emailWithName: Pattern = {
regex: regexes.emailWithName.source,
description: "Must be a valid email address, optionally with a name",
}
export const base64: Pattern = {
regex: regexes.base64.source,
description:

View File

@@ -26,8 +26,12 @@ export const torUrl =
// https://ihateregex.io/expr/ascii/
export const ascii = /^[ -~]*$/
//https://ihateregex.io/expr/email/
export const email = /[^@ \t\r\n]+@[^@ \t\r\n]+\.[^@ \t\r\n]+/
// https://www.regular-expressions.info/email.html
export const email = /[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}/
export const emailWithName = new RegExp(
`(${email.source})|([^<]*<(${email.source})>)`,
)
//https://rgxdb.com/r/1NUN74O6
export const base64 =