Closed innir closed 1 year ago
That looks like a bug to me. I think the most straight forward way would be:
mime
package and if available use it to guess the mime type.application/octet-stream
.I don't want an explicit dependency on mime
because I know of users who work in environments where it is hard to bring in additional dependencies.
Feel free to submit a PR, I can't promise when I will get around to implementing anything :/
I didn't include checking if mime
is installed or not, I guess it's easier if users just provide the MIME type guessed by mime
directly.
Hi,
while the method
mime_part.character()
has a parametertype
it is not passed down to.file_attachment()
in https://github.com/olafmersmann/sendmailR/blob/main/R/mime_part.R#L210:vs.
I didn't open a PR because it's not completely obvious how to handle this. One idea would be to use the package mime to guess the MIME type of the file.