# flowmailer/m2connector

> Flowmailer Connector for Magento 2

`composer require flowmailer/m2connector`

Canonical URL: https://packagento.com/flowmailer/m2connector

## At a glance

- **Vendor**: flowmailer (https://packagento.com/flowmailer.md)
- **Latest version**: 2.2.0 — released 2026-06-30
- **Pricing**: Free
- **Package type**: Magento 2 module
- **Status**: active, accepting new buyers

## Installation

Packagento is licence-gated, so even free packages need a licence on a project before Composer can resolve them.

1. **Sign in or create an account** at https://packagento.com/customer/account/.

2. **Add the package to your account.** Open https://packagento.com/flowmailer/m2connector and complete the free checkout. A licence is minted automatically.

3. **Create or pick a project, then activate the licence on it.**
   - Projects represent the Magento installs you deploy to. Manage them at https://packagento.com/projects/.
   - Activate the new licence on the project you'll deploy this package to. Activation is what generates the Composer credentials scoped to that project.

4. **Add the project credentials to your Magento codebase.**

   Grab the project's public + private key from https://packagento.com/projects/ (open the project, then its Credentials tab), and add them to `auth.json`:

   ```json
   {
     "http-basic": {
       "packagento.com": {
         "username": "ppk_live_...",
         "password": "psk_live_..."
       }
     }
   }
   ```

   Add the Packagento Composer repository to `composer.json`:

   ```json
   {
     "repositories": [
       { "type": "composer", "url": "https://packagento.com" }
     ]
   }
   ```

5. **Install and apply.**

   ```bash
   composer require flowmailer/m2connector:*
   bin/magento setup:upgrade
   bin/magento setup:di:compile
   bin/magento cache:flush
   ```

## What it does

Flowmailer Connector for Magento 2

## README

This extension allows you to configure Magento 2 to send all emails using Flowmailer including raw data.

See [flowmailer.com](https://flowmailer.com/) for more information.

### Compatibility

| Module version | Magento / Adobe Commerce | PHP                |
|----------------|--------------------------|--------------------|
| `^2.2`         | 2.4.7, 2.4.8 (+ patches) | 8.1, 8.2, 8.3, 8.4 |
| `^2.1`         | 2.4.4 – 2.4.8            | 7.4, 8.0, 8.1, 8.2 |
| `^1.0`         | 2.3, 2.4 (< 2.4.4)       | 7.3, 7.4, 8.0      |

Magento 2.4.8 removed the `laminas/laminas-mail` dependency. Module versions `< 2.2` therefore
fail at runtime on 2.4.8 with `Class "Laminas\Mail\Message" not found`. Upgrade to `^2.2`.

### Installation

A normal installation would be something equal to:
```bash
composer require flowmailer/flowmailer-php-sdk flowmailer/m2connector symfony/http-client nyholm/psr7
```

Choose your preferred [flowmailer-php-sdk implementations](https://packagist.org/providers/flowmailer/flowmailer-php-sdk-implementation) on packagist, based on your minimum requirement for PHP.  

Choose your preferred [client implementations](https://packagist.org/providers/psr/http-client-implementation) on packagist.  
See [docs.php-http.org](https://docs.php-http.org/en/latest/httplug/users.html) for details on the HttpClient discovery.  

Enable the module:
```bash
bin/magento module:enable Flowmailer_M2Connector --clear-static-content
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento module:status Flowmailer_M2Connector
bin/magento cache:clean
```

### Configuration

Obtain credentials from [Flowmailer credentials wizard](https://dashboard.flowmailer.net/setup/sources/credentialswizard.html)

Go to http://your-magento-store/admin and login with your admin credentials.

Navigate to Stores > Configuration > Flowmailer > Connector and add API Credentials.

### Upgrading to 2.2.x

The 2.2 release removes the hard dependency on `laminas/laminas-mail`, which was
removed from Magento core in 2.4.8. The plugin now consumes Magento's own
`Magento\Framework\Mail\MessageInterface` directly. Existing template-variable
handling and admin configuration are unchanged.

After upgrade run:
```bash
composer update flowmailer/m2connector flowmailer/flowmailer-php-sdk
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento cache:flush
```

### Development

Static analysis uses the official PHPStan bridge for Magento.

```bash
composer install
composer analyse
```

See `phpstan.neon` for the configured rule level.

## Recent Versions

| Version | Released |
|---|---|
| 2.2.0 | 2026-06-30 |
| 2.1.1 | 2026-06-29 |
| 2.1.0 | 2024-12-16 |
| 2.0.0 | 2022-06-01 |
| 1.0.15 | 2021-09-08 |
| 1.0.13 | 2020-10-19 |
| 1.0.11 | 2020-07-30 |
| 1.0.10 | 2019-12-20 |
| 1.0.8 | 2019-05-06 |
| 1.0.7 | 2019-04-24 |

Showing 10 of 15 versions. Full release history on https://packagento.com/flowmailer/m2connector.

## Dependencies

### Require

| Package | Constraint |
|---|---|
| flowmailer/flowmailer-php-sdk-implementation | ^1.0 \|\| ^2.0 |
| magento/framework | ^103.0 |
| magento/module-sales | ^103 |
| php | ^8.1 |
| psr/log | ^1.0 \|\| ^2.0 \|\| ^3.0 |

### Require (dev)

| Package | Constraint |
|---|---|
| bitexpert/phpstan-magento | ^0.30 \|\| ^0.31 |
| ergebnis/composer-normalize | ^2.23 |
| flowmailer/flowmailer-php-sdk | ^2.3 |
| friendsofphp/php-cs-fixer | ^3.50 |
| icanhazstring/composer-unused | ^0.8 |
| maglnet/composer-require-checker | ^4.0 |
| nyholm/psr7 | ^1.8 |
| phpstan/extension-installer | ^1.4 |
| phpstan/phpstan | ^1.10 \|\| ^2.0 |
| phpunit/phpunit | ^9.6 \|\| ^10.0 |
| rector/rector | ^1.0 |
| symfony/http-client | ^6.4 \|\| ^7.0 |

## Quality

Latest release (2.2.0) fails the Packagento QA pipeline. Verdicts below are per-cell (Magento line × PHP version) for the matrixed tools, and run-once for the static / security tiers.


### Compatibility

Each Magento line is installed on its supported PHP versions, then the module is built (DI compile + static-content deploy). Cells show passed / failed / untested; staircase gaps render as `–`.

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | not tested | not tested | – | – |
| 2.4.8 | – | not tested | not tested | – |
| 2.4.9 | – | – | not tested | not tested |


### Code Quality

Advisory checks against the module's source. Never affect the Compatibility verdict — a phpcs finding can't make a module incompatible.

#### Static Analysis

Coding standards (phpcs), mess detection (phpmd), copy-pasted code (cpd), PHP cross-version compatibility, composer.json validity. Each runs once for the whole module.

| Tool | Status | Findings | Summary |
|---|---|---|---|
| PHPCS | Fail | 12 | 3 errors, 9 warnings (ruleset: Magento2) |
| PHPMD | Warning | 4 | 4 rule violations (UnusedFormalParameter:4) |
| Cpd | Pass | 0 |  |
| Composer validate | Pass | 0 |  |

#### PHPStan

Type-checks the module against a real Magento install. Re-runs per Magento + PHP version because resolvable symbols differ between releases.

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | Error | Error | – | – |
| 2.4.8 | – | Error | Error | – |
| 2.4.9 | – | – | Error | Error |


### Tests

Unit and integration suites run per Magento + PHP cell. Test failures speak to the module's behaviour, not its compatibility with a line, so they're reported here separately.

#### Unit Tests

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | – | – |
| 2.4.8 | – | N/A | N/A | – |
| 2.4.9 | – | – | N/A | N/A |

#### Integration Tests

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | – | – |
| 2.4.8 | – | N/A | N/A | – |
| 2.4.9 | – | – | N/A | N/A |


### Security

Dependency-advisory audit (composer audit) plus a source malware scan. A malware detection fails the version outright.

| Tool | Status | Findings | Summary |
|---|---|---|---|
| Composer audit | Pass | 0 |  |
| Malware scan | Pass | 0 |  |

## Licence and pricing

Free. A licence is still minted on checkout and bound to your project for Composer access — no payment step.

Refundable within 14 days of first purchase via https://packagento.com/account/refunds/.

## Install via Claude Code or any MCP client

The Packagento MCP server can run the licence + project + Composer steps above in one tool call:

```
purchase_and_install_packages(
  composer_names=["flowmailer/m2connector"],
  project_id="proj_xxx"
)
```

This handles cart, checkout, licence minting, project activation, and writes auth.json credentials. Connect a client with `claude mcp add packagento https://mcp.packagento.com`. Full setup at https://packagento.com/docs/mcp-setup.

## Vendor

flowmailer is a Magento 2 vendor on Packagento. See https://packagento.com/flowmailer.md for their full catalogue.

