-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WebAPI / Incoming webhooks - missing ContentDisposition in Structure #258
Comments
Hi @morki! Yeah, this makes sense. I'll look into adding it soonish. |
for each message part. The ContentDisposition value is the base value without header key/value parameters. the Filename field is the likely filename of the part. the different email clients encode filenames differently. there is a standard mime mechanism from rfc 2231. and there is the q/b-word-encoding from rfc 2047. instead of letting users of the webhook api deal with those differences, we provide just the parsed filename. for issue #258 by morki, thanks for reporting!
@morki the commit above adds the ContentDisposition word ("attachment", "inline"), and instead of the ContentDispositionParams, it adds a "Filename" field. this is due to differences in where email clients put the filename, and in which encoding. could you see if this works for you? See https://www.xmox.nl/b/#42793834f8b6112a40e0ee9508c40c6e1798d23d for a binary with this commit. |
Thank you @mjl- for so fast reply and sorry for my late, I was on vacations. I tried the binary you created, The ContentDisposition seems fine, but the Filename is always empty in my tests (event sending from webmail in other mox instance). {
"ContentType": "application/pdf",
"ContentTypeParams": {},
"ContentID": "",
"ContentDisposition": "attachment",
"Filename": "",
"DecodedSize": 200966,
"Parts":[]
} |
Hey @mjl- ,
thank you again for such a great project. I have some trouble with using incoming webhooks for our system.
Specifically we are missing
ContentDisposition
andContentDispositionParams
fields to construct representation of email with attachments for our delivery queue. Is it possible to add those please?https://pkg.go.dev/github.com/mjl-/[email protected]/webhook#Structure
Desired state
The text was updated successfully, but these errors were encountered: