- How do I install hocza/sendy in a Laravel application?
- Install the package with Composer using composer require hocza/sendy, then follow the README to register the service provider and publish the configuration. It is described as a Laravel 5 package, so confirm your application version before installing. Publish the config and set your Sendy URL, API key, and list IDs.
- Which Laravel and PHP versions does hocza/sendy support?
- The package is described as a service provider for Laravel 5, and the provided overview does not list explicit PHP, Guzzle, or Sendy API version constraints beyond that. Check composer.json and release notes, then test against your runtime before adopting it. The last release was January 2024, so verify compatibility rather than assuming current Laravel support.
- How do I configure the Sendy API URL and API key in Laravel?
- Publish the package configuration and set the Sendy installation URL, API key, and default list IDs, preferably through environment variables. Keep the API key out of source control and rotate it like any other secret. Clear Laravel's config cache after changes and validate required values during application boot.
- What Sendy endpoints does hocza/sendy cover?
- The package overview says it manages subscriber lists, adds or unsubscribes subscribers, and triggers campaigns. It does not confirm coverage for delete, list creation, or campaign status checks in the provided description. Inspect the source or README before relying on any specific endpoint.
- How do I subscribe a user to a Sendy list using hocza/sendy?
- Call the package's subscribe method from an application service or queued job, passing the target list ID and the subscriber fields required by Sendy. Wrap the call behind an internal NewsletterGateway interface so you can replace it later. Validate the response and log failures rather than assuming the subscription succeeded.
- Can I queue Sendy API calls with hocza/sendy?
- The package appears to make synchronous HTTP calls, so queue outbound Sendy requests through Laravel jobs rather than calling it directly in web requests. Add retry and dead-letter handling in your queue configuration. This also keeps slow or failing Sendy API calls out of user-facing latency.
- Does hocza/sendy support retries, timeouts, and error handling?
- The provided overview does not document built-in retry, timeout, idempotency, or error-mapping behavior; it is a thin wrapper with weak observability. Configure HTTP client timeouts, implement retries and idempotency at the application layer, and validate API responses. Log request context without exposing the Sendy API key.
- Is hocza/sendy safe to use in production?
- It can be acceptable for low-risk Laravel workflows that already use Sendy, but it has weak ecosystem validation: 71 stars, zero dependents, and a last release in January 2024. Treat it as an accelerator, not a strategic dependency, and pin the package version. Plan to fork or replace it if maintenance stalls, and own secrets, consent, and unsubscribe compliance yourself.
- How do I handle unsubscribe and GDPR consent with Sendy in Laravel?
- Use the package to call Sendy's unsubscribe endpoint, but enforce consent, suppression lists, audit trails, and unsubscribe links in your application. Do not assume the package handles GDPR obligations or idempotency. Record unsubscribe requests and reconcile failures against Sendy.
- What are alternatives to hocza/sendy for Sendy integration in Laravel?
- The main alternative is a small in-house adapter around Sendy's REST API using Laravel's HTTP client, wrapped behind your own interface. You can also evaluate any other maintained Sendy SDK on Packagist, but check endpoint coverage and Laravel compatibility. If you are not committed to Sendy, consider a broader email platform abstraction instead.