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
- Validate a single email address
mailify -s your@email.com -v user@example.com
- Bulk validate emails from Excel file
mailify -s your@email.com -e emails.xlsx
- Get mail servers for a domain
mailify -s your@email.com -d example.com
- Get mail servers for an email address
mailify -s your@email.com -r user@example.com
Help
mailify --help
Development Setup
- Clone the repository
git clone https://github.com/yourusername/mailify-cli.git
cd mailify-cli
- Install dependencies
go mod download
- Build the project
go build -o mailify
Release Process
Using GoReleaser
- Install GoReleaser:
brew install goreleaser
- 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:'
- 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
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:
- Check the GitHub Issues
- Create a new issue if your problem isn't already reported