cli

command
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

README

Mailify CLI

Mailify CLI is a powerful command-line tool for email validation and mail server information retrieval. Built on top of the mailify library, it provides an easy-to-use interface for validating email addresses and getting mail server details.

Features

  • Single email address validation
  • Bulk email validation using Excel files
  • Mail server lookup for domains
  • Mail server lookup for email addresses
  • Simple flag-based interface

Installation

Using Go
go install github.com/yourusername/mailify-cli@latest
Using Binary Releases

Download the latest binary for your platform from the releases page.

Usage

The CLI tool uses a flag-based interface where all operations are performed using the main mailify command with different flags.

Required Flag
  • -s, --sender: Sender email address (required for all operations)
Operation Flags

You can use one of the following operation flags per command:

  • -v, --validate: Validate a single email address
  • -e, --excel: Process and validate emails from an Excel file
  • -d, --domain: Get mail servers for a domain
  • -r, --receipient: Get mail servers for a recipient email
Examples
  1. Validate a single email address
mailify -s your@email.com -v user@example.com
  1. Bulk validate emails from Excel file
mailify -s your@email.com -e emails.xlsx
  1. Get mail servers for a domain
mailify -s your@email.com -d example.com
  1. Get mail servers for an email address
mailify -s your@email.com -r user@example.com
Help
mailify --help

Development Setup

  1. Clone the repository
git clone https://github.com/yourusername/mailify-cli.git
cd mailify-cli
  1. Install dependencies
go mod download
  1. Build the project
go build -o mailify

Release Process

Using GoReleaser
  1. Install GoReleaser:
brew install goreleaser
  1. Create .goreleaser.yml:
before:
  hooks:
    - go mod tidy
builds:
  - env:
      - CGO_ENABLED=0
    goos:
      - linux
      - windows
      - darwin
    goarch:
      - amd64
      - arm64
    binary: mailify
archives:
  - replacements:
      darwin: Darwin
      linux: Linux
      windows: Windows
      amd64: x86_64
checksum:
  name_template: 'checksums.txt'
snapshot:
  name_template: "{{ incpatch .Version }}-next"
changelog:
  sort: asc
  filters:
    exclude:
      - '^docs:'
      - '^test:'
  1. Release Steps:
# Create and push a new tag
git tag -a v0.1.0 -m "First release"
git push origin v0.1.0

# Set GitHub token
export GITHUB_TOKEN="your-github-token"

# Create release
goreleaser release --rm-dist

Excel File Format

When using the -e, --excel flag, your Excel file should:

  • Have a column containing email addresses
  • Be in .xlsx format
  • The tool will create a new column with validation results

Error Handling

  • If no operation flag is specified, the tool will show an error message
  • All operations will return meaningful error messages if something goes wrong
  • The tool validates inputs before processing

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

If you encounter any issues or have questions, please:

  1. Check the GitHub Issues
  2. Create a new issue if your problem isn't already reported

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL