This is the main dovel repository, it has the Go code to run dovel SMTP server.
Author: blmayer (bleemayer@gmail.com)
Date: Tue Apr 18 20:32:58 2023 -0300
Parent: e737530
Minor improvements in message id and pages
commit b9771138362359f32ff09833446c9c0c17e54a44
Author: blmayer <bleemayer@gmail.com>
Date: Tue Apr 18 20:32:58 2023 -0300
Minor improvements in message id and pages
diff --git a/cmd/dovel/vault.go b/cmd/dovel/vault.go
index d8b7a72..b680ca4 100644
--- a/cmd/dovel/vault.go
+++ b/cmd/dovel/vault.go
@@ -9,12 +9,12 @@ import (
type plainTextUser struct {
Name string
- Address string
+ Mail string
Password string
}
func (u plainTextUser) Email() string {
- return u.Address
+ return u.Mail
}
func (u plainTextUser) Login() string {
commit b9771138362359f32ff09833446c9c0c17e54a44
Author: blmayer <bleemayer@gmail.com>
Date: Tue Apr 18 20:32:58 2023 -0300
Minor improvements in message id and pages
diff --git a/interfaces/file/file.go b/interfaces/file/file.go
index d1201c3..ed450c8 100644
--- a/interfaces/file/file.go
+++ b/interfaces/file/file.go
@@ -20,7 +20,6 @@ import (
"os"
"path"
"sort"
- "strconv"
"strings"
"time"
@@ -210,7 +209,7 @@ func (f FileHandler) SaveSent(email interfaces.Email) error {
}
func (f FileHandler) Send(mail interfaces.Email) error {
- mail.ID = fmt.Sprintf("%s%s", strconv.FormatInt(mail.Date.Unix(), 10), mail.From)
+ mail.ID = fmt.Sprintf("%d@%s", mail.Date.Unix(), f.domain)
body := bytes.Buffer{}
form := multipart.NewWriter(&body)
commit b9771138362359f32ff09833446c9c0c17e54a44
Author: blmayer <bleemayer@gmail.com>
Date: Tue Apr 18 20:32:58 2023 -0300
Minor improvements in message id and pages
diff --git a/interfaces/gwi/gwi.go b/interfaces/gwi/gwi.go
index d681671..c945455 100644
--- a/interfaces/gwi/gwi.go
+++ b/interfaces/gwi/gwi.go
@@ -13,7 +13,6 @@ import (
"net/smtp"
"os"
"path"
- "strconv"
"strings"
"time"
@@ -120,12 +119,12 @@ func (g GWIHandler) Save(email interfaces.Email) error {
email.To = []string{owner.Email()}
email.Body = fmt.Sprintf(
`You received an email with the subject %s.
-
- Check you project by visiting https://%s/%s/%s
- Yours.
+Check you project by visiting https://%s/%s/%s
- The GWI team.`,
+Yours.
+
+The GWI team.`,
email.Subject,
g.domain,
user,
@@ -137,7 +136,7 @@ func (g GWIHandler) Save(email interfaces.Email) error {
}
func (g GWIHandler) Send(mail interfaces.Email) error {
- mail.ID = fmt.Sprintf("%s%s", strconv.FormatInt(mail.Date.Unix(), 10), mail.From)
+ mail.ID = fmt.Sprintf("%d@%s", mail.Date.Unix(), g.domain)
body := bytes.Buffer{}
form := multipart.NewWriter(&body)
commit b9771138362359f32ff09833446c9c0c17e54a44
Author: blmayer <bleemayer@gmail.com>
Date: Tue Apr 18 20:32:58 2023 -0300
Minor improvements in message id and pages
diff --git a/www/mail.html b/www/mail.html
index 6cb2025..7445c35 100644
--- a/www/mail.html
+++ b/www/mail.html
@@ -28,9 +28,7 @@
{{end}}
{{if .Body}}
<br>
- <pre>
- {{.Body}}
- </pre>
+ <pre>{{.Body}}</pre>
{{end}}
<br>
{{end}}