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

Attachments in net.smtp.Mail #19920

Closed
2 tasks
DarkCat09 opened this issue Nov 17, 2023 · 0 comments · Fixed by #20640
Closed
2 tasks

Attachments in net.smtp.Mail #19920

DarkCat09 opened this issue Nov 17, 2023 · 0 comments · Fixed by #20640
Labels
Feature/Enhancement Request This issue is made to request a feature or an enhancement to an existing one.

Comments

@DarkCat09
Copy link
Contributor

DarkCat09 commented Nov 17, 2023

Describe the feature

Possibility to add attachments to an email.

Use Case

  1. Some complicated cases with automated mailing.
  2. Mail clients made with V UI (related to Implement net.mail with support for the SMTP, POP3 and IMAP protocols #11634).

Proposed Solution

Maybe it's better to add net.smtp.Attachment struct, and then attachments []Attachment field to net.smtp.Mail.

Every attachment contains:

  • representation of a file, either its path or []u8 buffer -- I'm new to Vlang, so I don't know how the implementaion should be done;
  • file mime type, if it is required by RFC;
  • ...

Also, I quickly gone through the RFC. This part might help...

For example, a two part message consisting of a text and a
BASE64-encoded text attachment can have a body structure of:
(("TEXT" "PLAIN" ("CHARSET" "US-ASCII") NIL NIL "7BIT" 1152 23)("TEXT" "PLAIN" ("CHARSET" "US-ASCII" "NAME" "cc.diff") "<[email protected]>" "Compiler diff" "BASE64" 4554 73) "MIXED")

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

Version used

0.4.3

Environment details (OS name and version, etc.)

V full version: V 0.4.3 55cac88.373da77
OS: linux, "Artix Linux"
Processor: 12 cpus, 64bit, [***]

getwd: /home/[***]
vexe: /home/[***]/v/v
vexe mtime: 2023-11-17 13:38:45

vroot: OK, value: /home/[***]/v
VMODULES: OK, value: /home/[***]/.vmodules
VTMP: OK, value: /tmp/v_1000

Git version: git version 2.42.1
Git vroot status: weekly.2023.45.1-65-g373da777 (3 commit(s) behind V master)
.git/config present: true

CC version: cc (GCC) 13.2.1 20230801
thirdparty/tcc status: thirdparty-linux-amd64 12f392c3

Note

You can use the 👍 reaction to increase the issue's priority for developers.

Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.

@DarkCat09 DarkCat09 added the Feature/Enhancement Request This issue is made to request a feature or an enhancement to an existing one. label Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature/Enhancement Request This issue is made to request a feature or an enhancement to an existing one.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant