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

TLS Certificates #80

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

TLS Certificates #80

wants to merge 7 commits into from

Conversation

markgrin
Copy link

Adding option to pass key and certificates to tls connection.

Description

Adding tls certificate solved this issue for me:
#76

Motivation and Context

#76 - I had this problem

How Has This Been Tested?

Sent emails to gmail

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@markgrin markgrin mentioned this pull request Aug 30, 2020
@CCAtAlvis
Copy link

node-sendmail/sendmail.js

Lines 297 to 303 in b76e5b2

if (line[3] === ' ') {
// 250-information dash is not complete.
// 250 OK. space is complete.
let lineNumber = parseInt(line.substr(0, 3));
response(lineNumber, msg);
msg = '';
}

Check these lines, a line is processed only if the code follows a <space> character

So if the server send 250-STARTTLS that won't be sent to response() and processed

Even I was trying to implement STARTTLS support but that would require quite some changes. Maybe we can pass another argument to the response() which would tell us whether its a <space> or dash and process line depending on that.

@CCAtAlvis
Copy link

Or maybe create an array with all SMTP Service Extensions available with server? This can help further if someone wants to implement/handle some other extension. 🤔

@markgrin
Copy link
Author

@CCAtAlvis , thank you for feedback. I tested this PR with google email account on gmail. It had no "unencrypted" tags on emails I sent, so I guess this is more or less a working solution. If you think you can improve this PR, you are welcome to. This looks like a dead repo (last updated in 2019). I think a greater issue is finding a new maintainer for this repo.

@CCAtAlvis
Copy link

@markgrin Ahh yes, I overlooked the code, works perfectly fine. I am rewriting the code base for my learning, might as well open source it!

@Laurenz1606
Copy link

@markgrin would it be okay for you if I fork this repo, merge your PR and publish it to npm as something like sendmail-tls?

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

Successfully merging this pull request may close these issues.

3 participants