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

Consider using tink_multipart #7

Open
kevinresol opened this issue Oct 24, 2018 · 11 comments
Open

Consider using tink_multipart #7

kevinresol opened this issue Oct 24, 2018 · 11 comments

Comments

@kevinresol
Copy link
Collaborator

No description provided.

@benmerckx
Copy link
Owner

This would be great. The differences that come to mind are a 76 character line limit and we need to be able to set additional headers for every chunk.

@kevinresol
Copy link
Collaborator Author

What is the line limit? Can we just split it while piping?

@benmerckx
Copy link
Owner

I wasn't completely correct, the rfc says:

There are two limits that this specification places on the number of
characters in a line. Each line of characters MUST be no more than
998 characters, and SHOULD be no more than 78 characters, excluding
the CRLF.

Split while piping should work, while inserting CRLF after every 78 characters.

@kevinresol
Copy link
Collaborator Author

we need to be able to set additional headers for every chunk.

Ok now it should be able to construct arbitrary parts,

@benmerckx
Copy link
Owner

I'll give this a go next week. Thinking of eliminating the tink_await dependency and the queue too.

@benmerckx
Copy link
Owner

This is on its way in the next branch. I removed await dependency, added base for proper testing, attachments are now streaming and changed the api so it's not dealing with an internal queue, and it's easier to deal with connection errors.

SmtpMailer.connect({
  host: 'localhost',
  port: 1025
}).next(mailer ->
  mailer.send(email).next(
    _ -> mailer.close()
  );
);

There's more to do so leaving a note for future me:

  • Properly encoding from/to headers, adding cc, bcc etc (see mtwin tools)
  • Structure MultipartEncoder more like a mail builder which outputs a RealSource (possibly split into another lib) (see also https://nodemailer.com/extras/mailcomposer/) - it could take an 'Email' object for ease of use
  • Implement quoted printable encoding (or keep mtwin dependency)
  • Inline attachments

@ConfidantCommunications
Copy link
Contributor

I noticed that both smtpmailer and tink_multipart have advanced a fair bit beyond their last haxelib releases (0.4.0 and 0.3.0 respectively). Are the git versions stable?

@benmerckx
Copy link
Owner

Ever since using lix I've not really been updating haxelib releases to be honest. I am using current master instead of haxelib releases in production.

@cedx
Copy link
Contributor

cedx commented Feb 11, 2021

@benmerckx Can you at least consider creating Git version tags? I'm not very comfortable using "insert git ref" releases...

@benmerckx
Copy link
Owner

@cedx done. Released to haxelib too.

@cedx
Copy link
Contributor

cedx commented Feb 15, 2021

Thanks a lot!

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

No branches or pull requests

4 participants