markdown-link-check icon indicating copy to clipboard operation
markdown-link-check copied to clipboard

`mailto:` link with multiple emails isn't handled correctly

Open DanielYang59 opened this issue 1 year ago • 6 comments

It looks mailto: link with multiple emails might not have been handled correctly,

The links has the following format (I removed the real email addresses for privacy concerns, but if there emails addresses are necessary to recreate this you could check here, it's public):

mailto:user_a@address,[email protected],[email protected]?subject=someSubjectOfTheEmail

And I got the following error:

[✖] mailto:user_a@address,[email protected],[email protected]?subject=someSubjectOfTheEmail → Status: 400

I'm not sure if this is an isemail issue though, but I noticed it's no longer maintained:

This repository has been archived by the owner on Oct 2, 2024. It is now read-only.

DanielYang59 avatar Nov 29 '24 11:11 DanielYang59

@DanielYang59

I'm not sure if this is an isemail issue though, but I noticed it's no longer maintained:

  • See https://github.com/tcort/markdown-link-check/issues/371

MikeMcC399 avatar Dec 04 '24 13:12 MikeMcC399

Hi Mike,

Thanks for letting me know. I don't know much about the internal working of markdown-link-check so not sure if I should propagate the issue to actual worker (isemail or node-email-verifier or whatever)

DanielYang59 avatar Dec 05 '24 12:12 DanielYang59

@DanielYang59

Thanks for letting me know. I don't know much about the internal working of markdown-link-check so not sure if I should propagate the issue to actual worker (isemail or node-email-verifier or whatever)

I'm not familiar with this in-depth, but It's probably an enhancement request for this repo. You can check yourself about the functionality of node-email-verifier, which looks like it only deals with a single e-mail address and not a complete mailto: link with multiple addresses and a subject field.

MikeMcC399 avatar Dec 05 '24 13:12 MikeMcC399

the code of the email check is here https://github.com/tcort/link-check/blob/3263c3b65917375c209928ca2b1ad4102824da36/lib/proto/mailto.js#L8. It only checks the text between the mailto: and the ? character as a single email. It should try to split the string using the comma separator and loop on each single email found

smainil avatar Dec 06 '24 07:12 smainil

This issue has been marked as stale because it has been open 60 days with no activity. It will be closed in 30 days unless the stale label is removed or someone adds a comment.

github-actions[bot] avatar Apr 08 '25 08:04 github-actions[bot]

Based on https://github.com/tcort/markdown-link-check/issues/378#issuecomment-2522348292 this would still be an open issue as the referenced code https://github.com/tcort/link-check/blob/master/lib/proto/mailto.js was last changed in Oct 2024 when isemail was replaced.

MikeMcC399 avatar Apr 08 '25 09:04 MikeMcC399

This issue has been marked as stale because it has been open 60 days with no activity. It will be closed in 30 days unless the stale label is removed or someone adds a comment.

github-actions[bot] avatar Jun 16 '25 08:06 github-actions[bot]

This issue is still open and reproducible.

markdown-link-check does not respect the syntax of RFC 6068 - The 'mailto' URI Scheme for multiple e-mail addresses, and logs a 400 error.

cat > multiple-mail.md <<EOT
[send to one recipient](mailto:[email protected])
[send to two recipients](mailto:[email protected],[email protected])
EOT
npm install markdown-link-check@latest -g
markdown-link-check multiple-mail.md
FILE: multiple-mail.md
  [✓] mailto:[email protected]
  [✖] mailto:[email protected],[email protected]

  2 links checked.

  ERROR: 1 dead links found!
  [✖] mailto:[email protected],[email protected] → Status: 400

MikeMcC399 avatar Jun 16 '25 09:06 MikeMcC399

This issue has been marked as stale because it has been open 60 days with no activity. It will be closed in 90 days unless the stale label is removed or someone adds a comment.

github-actions[bot] avatar Sep 16 '25 08:09 github-actions[bot]

The last release was v3.13.7 on March 11, 2025 which is 6 months ago.

I suggest to increase the stale-bot time-frame accordingly. There is no point in flagging an issue as stale after 2 months if the typical release cadence is greater than 2 months. Otherwise issues like this may get automatically closed, even though the bug / feature request is still relevant.

MikeMcC399 avatar Sep 16 '25 08:09 MikeMcC399

Yep I agree it's quite annoying if we need to add a random comment every now and often just to prevent the PR being closed by the bot...

DanielYang59 avatar Sep 17 '25 17:09 DanielYang59

I would take on this task myself (instead of having to deal with the bot)....

DanielYang59 avatar Sep 17 '25 17:09 DanielYang59

@tcort / @DanielYang59

  • I believe that this issue has been prematurely closed due to PR https://github.com/tcort/link-check/pull/106 including an auto-close for this issue (https://github.com/tcort/markdown-link-check/issues/378)

  • Now, although https://github.com/tcort/link-check/pull/106 resulted in the release of [email protected], this does not automatically fix markdown-link-check.

To fix markdown-link-check reliably, it would need https://github.com/tcort/markdown-link-check/blob/e6703d0783204e80a31ebe2097b96b3165c3907f/package.json#L39 bumping to "link-check": "^5.5.0" and a new release of markdown-link-check would need to be cut. If that isn't done, only new installations of markdown-link-check will get the fix. Existing installations won't get notified or updated about a fix.

MikeMcC399 avatar Sep 17 '25 19:09 MikeMcC399