fix: attachments?
This commit is contained in:
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),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user