Skip to content
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

Howto forward email with attachment #6

Open
bunyevacz opened this issue Jun 7, 2018 · 3 comments
Open

Howto forward email with attachment #6

bunyevacz opened this issue Jun 7, 2018 · 3 comments

Comments

@bunyevacz
Copy link

Forwarding email does not seem to include the original attachment.
So the only workaround right now, if I save the attachment on the original message,
then forward, and reattach the file itself.
It is a major pita. Do I miss something obvious here?

@andris9
Copy link
Member

andris9 commented Jun 7, 2018

Yeah, this is something I have planned but havent got around to so far.

@bunyevacz
Copy link
Author

This seem to be a backend issue.
So wildduck should implement a copy-over-attachment feature. So when forwarding and email it copies over attachment, without requiring from the user to save to his computer and reupload it.

I browsed through the api documentation:
https://api.wildduck.email/#api-Messages-GetMessageAttachment

And it should be something like this:
https://api.wildduck.email/users/:user/mailboxes/:mailbox/messages/:message/attachments/:attachment/copyover

Or forward no preference over the keyword. But on the backend it should be actually copy to the current draft state. Even when the original email is deleted, the forwarded email's attachment (which is only at draft state before sending) should be kept.

What do you think?

@bunyevacz
Copy link
Author

bunyevacz commented Sep 10, 2018

I will document my adventure to achieve this feature:)

I think the compose email / draft feature should be developed further.

So when a user creates a blank new email,
browser->wildduck-webmail

GET /webmail/send

No additional options.

When I save an actual draft, this happens:

GET /webmail/send
params:
-----------------------------339040071836135802421614038
Content-Disposition: form-data; name="_csrf"

wXPhnjDd-E1Zn2uEYjBeC-U7ok61Ley9AfRo
-----------------------------339040071836135802421614038
Content-Disposition: form-data; name="action"

send
-----------------------------339040071836135802421614038
Content-Disposition: form-data; name="refMailbox"


-----------------------------339040071836135802421614038
Content-Disposition: form-data; name="refMessage"


-----------------------------339040071836135802421614038
Content-Disposition: form-data; name="draftMailbox"


-----------------------------339040071836135802421614038
Content-Disposition: form-data; name="draftMessage"


-----------------------------339040071836135802421614038
Content-Disposition: form-data; name="draft"


-----------------------------339040071836135802421614038
Content-Disposition: form-data; name="userAction"

save
-----------------------------339040071836135802421614038
Content-Disposition: form-data; name="from"

5b184657c4acb0049beafdcb
-----------------------------339040071836135802421614038
Content-Disposition: form-data; name="to"


-----------------------------339040071836135802421614038
Content-Disposition: form-data; name="cc"


-----------------------------339040071836135802421614038
Content-Disposition: form-data; name="bcc"


-----------------------------339040071836135802421614038
Content-Disposition: form-data; name="subject"


-----------------------------339040071836135802421614038
Content-Disposition: form-data; name="editordata"

<p>elso<br></p>
-----------------------------339040071836135802421614038
Content-Disposition: form-data; name="files"; filename=""
Content-Type: application/octet-stream


-----------------------------339040071836135802421614038
Content-Disposition: form-data; name="attachment"; filename=""
Content-Type: application/octet-stream


-----------------------------339040071836135802421614038--

I think some api cleanup is needed here. I'll try to think on it a bit more. And also research to what api calls its translated on wildduck-webmail -> wildduck.

These are the cases:

  1. create a blank email (new draft)
  2. save draft without attachment (versioning)
    2.b save draft with attachment (add attachment)
    2.c save draft and remove attachment (able to remove attachment)
  3. open a draft
  4. send a draft
  5. discard a draft

Forwarding email needs 2.b from the above, so create a new draft with text, and also add attachment.

I'll be back:)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants