mirror of
https://github.com/ivabus/pop
synced 2024-12-04 22:15:08 +03:00
fix: attachments?
This commit is contained in:
parent
72450a7fc6
commit
fc5b088c4f
1 changed files with 2 additions and 6 deletions
8
email.go
8
email.go
|
@ -47,16 +47,12 @@ func sendEmail(to []string, from, subject, body string, paths []string) error {
|
|||
|
||||
attachments := make([]resend.Attachment, len(paths))
|
||||
for i, a := range paths {
|
||||
abs, err := filepath.Abs(a)
|
||||
if err != nil {
|
||||
continue
|
||||
}
|
||||
content, err := os.ReadFile(abs)
|
||||
f, err := os.ReadFile(a)
|
||||
if err != nil {
|
||||
continue
|
||||
}
|
||||
attachments[i] = resend.Attachment{
|
||||
Content: string(content),
|
||||
Content: string(f),
|
||||
Filename: filepath.Base(a),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue