PHPackages                             proxiedmail/php-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. proxiedmail/php-client

ActiveLibrary[API Development](/categories/api)

proxiedmail/php-client
======================

Library for working with ProxiedMail API

0.6.0(2y ago)2541LGPL-3.0-or-laterPHPPHP ^7.4 || ^8.0

Since Jan 8Pushed 1y agoCompare

[ Source](https://github.com/proxied-mail/proxiedmail-php-client)[ Packagist](https://packagist.org/packages/proxiedmail/php-client)[ RSS](/packages/proxiedmail-php-client/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (3)Versions (15)Used By (1)

ProxiedMail PHP client
======================

[](#proxiedmail-php-client)

Welcome to [ProxiedMail](https://proxiedmail.com) API client. You're welcome to [visit the docs](https://docs.proxiedmail.com).

[Packagist](https://packagist.org/packages/proxiedmail/php-client)

### Features

[](#features)

🔴 Authorization

🔴 Callback receiver (creating callback urls, read callback payload)

🔴 Proxy-emails CRUD (create, read, update, todo: delete)

### Installation

[](#installation)

```
composer require proxiedmail/php-client
```

### Test run

[](#test-run)

If you want to run tests, make sure .env with credentials present. Copy command:

```
cp .env.dist .env
```

To run:

```
make test-run
```

Getting started: receiving email to your application
----------------------------------------------------

[](#getting-started-receiving-email-to-your-application)

Here in this example you can see how to receive sent email to your API. The program will print email address created to receive your email message.

```
PROXY-EMAIL: 4bd6c97b9@proxiedmail.com
Webhook STATUS:
Received: no

```

Then, just send the email to the printed address. When app receive your message, it will print the following:

```
PROXY-EMAIL: 4bd6c97b9@proxiedmail.com
Webhook STATUS:
Received: yes
WEBHOOK PAYLOAD:
{
   "id":"EB442408-D500-0000-00003CC8",
   "payload":{
      "Content-Type":"multipart\/alternative; boundary=\"000000000000714564060f56f6c2\"",
      "Date":"Sat, 20 Jan 2024 02:00:25 +0000",
      "Dkim-Signature":"DKIM",
      "From":"Alex Yatsenko ",
      "Message-Id":"",
      "Mime-Version":"1.0",
      "Received":"by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-40e9ffab5f2so10064475e9.1 for ; Fri, 19 Jan 2024 18:00:38 -0800 (PST)",
      "Subject":"hey mate",
      "To":"4bd6c97b9@proxiedmail.com",
      "X-Envelope-From":"sender@gmail.com",
      "X-Mailgun-Incoming":"Yes",
      "X-Received":"Received details",
      "body-html":"hey hey\r\n",
      "body-plain":"hey hey\r\n",
      "domain":"proxiedmail.com",
      "from":"Alex Alex ",
      "message-headers":"HEADERS JSON....",
      "recipient":"4bd6c97b9@proxiedmail.com",
      "sender":"sender@gmail.com",
      "signature":"....",
      "stripped-html":"hey hey\n",
      "stripped-text":"hey hey",
      "subject":"hey mate",
      "timestamp":"1705716046",
      "token":"..."
   },
   "attachments":[

   ],
   "recipient":{
      "address":"4bd6c97b9@proxiedmail.com"
   },
   "receivedAt":"Sat Jan 20 2024 02:00:46 GMT+0000",
   "user":{
      "id":"1B3AAA43-11-0000-cc",
      "username":"username+t1@gmail.com",
      "token":"Bearer ...."
   }
}

```

The code to execute is the following

```
