mirror of
https://github.com/wneessen/go-mail.git
synced 2024-11-22 05:40:50 +01:00
Add WithContentID function to file.go
The newly added function, WithContentID, allows for setting the Content-ID header for the File. This provides enhanced handling and differentiation of files.
This commit is contained in:
parent
8b1208949f
commit
b709df4b2d
1 changed files with 7 additions and 0 deletions
7
file.go
7
file.go
|
@ -22,6 +22,13 @@ type File struct {
|
|||
Writer func(w io.Writer) (int64, error)
|
||||
}
|
||||
|
||||
// WithContentID sets the Content-ID header for the File
|
||||
func WithContentID(id string) FileOption {
|
||||
return func(f *File) {
|
||||
f.Header.Set(HeaderContentID.String(), id)
|
||||
}
|
||||
}
|
||||
|
||||
// WithFileName sets the filename of the File
|
||||
func WithFileName(name string) FileOption {
|
||||
return func(f *File) {
|
||||
|
|
Loading…
Reference in a new issue