diff --git a/eml.go b/eml.go index 844a5ad..ed20d0d 100644 --- a/eml.go +++ b/eml.go @@ -405,7 +405,7 @@ func parseEMLAttachmentEmbed(contentDisposition []string, multiPart *multipart.P } case "inline": if contentID, _ := parseMultiPartHeader(multiPart.Header.Get(HeaderContentID.String())); contentID != "" { - if err := msg.EmbedReader(filename, dataReader, WithContentID(contentID)); err != nil { + if err := msg.EmbedReader(filename, dataReader, WithFileContentID(contentID)); err != nil { return fmt.Errorf("failed to embed multipart body: %w", err) } return nil diff --git a/file.go b/file.go index a759b3d..45e142a 100644 --- a/file.go +++ b/file.go @@ -22,8 +22,8 @@ type File struct { Writer func(w io.Writer) (int64, error) } -// WithContentID sets the Content-ID header for the File -func WithContentID(id string) FileOption { +// WithFileContentID sets the Content-ID header for the File +func WithFileContentID(id string) FileOption { return func(f *File) { f.Header.Set(HeaderContentID.String(), id) }