1
0
mirror of https://github.com/axllent/mailpit.git synced 2025-02-09 13:38:37 +02:00

Merge branch 'release/v1.3.5'

This commit is contained in:
Ralph Slooten 2023-01-05 11:58:06 +13:00
commit e3e7c09e81
4 changed files with 38 additions and 4 deletions

View File

@ -0,0 +1,23 @@
name: Close stale issues
on:
schedule:
- cron: "30 1 * * *"
jobs:
close-issues:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v7.0.0
with:
days-before-issue-stale: 30
days-before-issue-close: 7
exempt-issue-labels: "enhancement,bug"
stale-issue-label: "stale"
stale-issue-message: "This issue is stale because it has been open for 30 days with no activity."
close-issue-message: "This issue was closed because it has been inactive for 7 days since being marked as stale."
days-before-pr-stale: -1
days-before-pr-close: -1
repo-token: ${{ secrets.GITHUB_TOKEN }}

View File

@ -2,6 +2,12 @@
Notable changes to Mailpit will be documented in this file.
## v1.3.5
### Bugfix
- Include HTML link text in search data
## v1.3.4
### Bugfix

View File

@ -117,7 +117,7 @@ func VerifyConfig() error {
}
if UISSLCert != "" && UISSLKey == "" || UISSLCert == "" && UISSLKey != "" {
return errors.New("you must provide both a UI SSL certificate and a key")
return errors.New("You must provide both a UI SSL certificate and a key")
}
if UISSLCert != "" {
@ -131,7 +131,7 @@ func VerifyConfig() error {
}
if SMTPSSLCert != "" && SMTPSSLKey == "" || SMTPSSLCert == "" && SMTPSSLKey != "" {
return errors.New("you must provide both an SMTP SSL certificate and a key")
return errors.New("You must provide both an SMTP SSL certificate and a key")
}
if SMTPSSLCert != "" {

View File

@ -37,7 +37,12 @@ func createSearchText(env *enmime.Envelope) string {
b.WriteString(env.GetHeader("To") + " ")
b.WriteString(env.GetHeader("Cc") + " ")
b.WriteString(env.GetHeader("Bcc") + " ")
h := strings.TrimSpace(html2text.HTML2Text(env.HTML))
h := strings.TrimSpace(
html2text.HTML2TextWithOptions(
env.HTML,
html2text.WithLinksInnerText(),
),
)
if h != "" {
b.WriteString(h + " ")
} else {
@ -56,7 +61,7 @@ func createSearchText(env *enmime.Envelope) string {
// CleanString removes unwanted characters from stored search text and search queries
func cleanString(str string) string {
// remove/replace new lines
re := regexp.MustCompile(`(\r?\n|\t|>|<|"|:|\,|;)`)
re := regexp.MustCompile(`(\r?\n|\t|>|<|"|\,|;)`)
str = re.ReplaceAllString(str, " ")
// remove duplicate whitespace and trim