Skip to content

Conversation

SineSwiper
Copy link
Contributor

This is just a simple addition of a new SMTP scheme, which works very similarly to the existing POP scheme code. I moved over the POP methods to a URI::_emailauth module, since multiple email-based schemes use that same user;AUTH= URL pattern.

@oalders oalders requested a review from Copilot August 20, 2025 22:07
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a new SMTP URI scheme implementation that follows the same pattern as the existing POP scheme. The main purpose is to provide support for SMTP URIs with user authentication parameters.

Key changes:

  • Refactors common email authentication logic into a shared URI::_emailauth module
  • Implements a new URI::smtp module that inherits from the shared email authentication base
  • Updates documentation to include the new SMTP scheme

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
lib/URI/smtp.pm New SMTP scheme implementation with default port 25
lib/URI/_emailauth.pm Extracted common email auth methods from POP for reuse
lib/URI/pop.pm Refactored to inherit from new _emailauth base class
lib/URI.pm Added SMTP scheme documentation and updated references
t/smtp.t Comprehensive test suite for SMTP URI functionality
dist.ini Updated configuration to handle new modules

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

my $user = $1;
$new =~ s/;auth=[^;]*//i;


Copy link
Preview

Copilot AI Aug 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the extra blank line. This appears to be unnecessary whitespace that should be cleaned up.

Suggested change

Copilot uses AI. Check for mistakes.

@@ -976,7 +976,7 @@ which has its own defaults for I<ftps> and I<ftpes> URI schemes.
=item B<gopher>:

The I<gopher> URI scheme is specified in
<draft-murali-url-gopher-1996-12-04> and will hopefully be available
C<draft-murali-url-gopher-1996-12-04> and will hopefully be available
Copy link
Preview

Copilot AI Aug 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] This change from angle brackets to C<> markup is inconsistent with the SMTP documentation format which uses L<> for external links. Consider using L instead for consistency.

Suggested change
C<draft-murali-url-gopher-1996-12-04> and will hopefully be available
L<draft-murali-url-gopher-1996-12-04> and will hopefully be available

Copilot uses AI. Check for mistakes.

@@ -120,7 +121,6 @@ trustme = URI::gopher => qr/^(?:gopher_type|gtype|search|selector|string)$/
trustme = URI::ldapi => qr/^(?:un_path)$/
trustme = URI::mailto => qr/^(?:headers|to)$/
Copy link
Preview

Copilot AI Aug 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The removal of the POP trustme line appears to be incorrect. The user and auth methods are now in URI::_emailauth but may still need to be trusted for POP documentation coverage since they're public methods of the POP class.

Suggested change
trustme = URI::mailto => qr/^(?:headers|to)$/
trustme = URI::mailto => qr/^(?:headers|to)$/
trustme = URI::pop => qr/^(?:user|auth)$/

Copilot uses AI. Check for mistakes.

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.

1 participant