From 8472267b60b204cea5fbdeaf8fe06443822d1bfb Mon Sep 17 00:00:00 2001 From: s Date: Tue, 25 Nov 2025 09:38:31 -0500 Subject: feat: add crypto analysis, email verification, and telegram lookup commands --- cmd/email.go | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 cmd/email.go (limited to 'cmd/email.go') diff --git a/cmd/email.go b/cmd/email.go new file mode 100644 index 0000000..f4306ec --- /dev/null +++ b/cmd/email.go @@ -0,0 +1,45 @@ +package cmd + +import ( + "git.db.org.ai/dborg/internal/formatter" + "github.com/spf13/cobra" +) + +var emailCmd = &cobra.Command{ + Use: "email", + Short: "Email verification commands", + Long: `Verify email addresses and check deliverability`, +} + +var verifyEmailCmd = &cobra.Command{ + Use: "verify [email]", + Short: "Verify email address", + Long: `Performs comprehensive email verification including format validation, MX records check, SMTP verification, and disposable/webmail detection`, + Args: cobra.ExactArgs(1), + RunE: runVerifyEmail, +} + +func init() { + rootCmd.AddCommand(emailCmd) + emailCmd.AddCommand(verifyEmailCmd) +} + +func runVerifyEmail(cmd *cobra.Command, args []string) error { + email := args[0] + + c, err := newClient() + if err != nil { + return err + } + + response, err := c.VerifyEmail(email) + if err != nil { + return err + } + + if err := checkError(response.Error); err != nil { + return err + } + + return formatter.FormatEmailResults(response, IsJSONOutput()) +} -- cgit v1.2.3