{"id":24318648,"url":"https://github.com/souptik2001/all-path-messaging","last_synced_at":"2026-02-23T18:35:37.308Z","repository":{"id":257023756,"uuid":"760576206","full_name":"Souptik2001/all-path-messaging","owner":"Souptik2001","description":"Limitless Communication: All-in-One, super scalable, messaging Solution for WordPress.","archived":false,"fork":false,"pushed_at":"2024-10-27T08:27:44.000Z","size":5076,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-27T09:28:11.318Z","etag":null,"topics":["email","sms","wordpress","wordpress-plugin"],"latest_commit_sha":null,"homepage":"https://wordpress.org/plugins/all-path-messaging/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Souptik2001.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-20T16:00:38.000Z","updated_at":"2024-10-27T08:27:47.000Z","dependencies_parsed_at":"2024-09-16T22:57:45.777Z","dependency_job_id":"f00df51d-4882-47f9-ba67-84b2679afbd2","html_url":"https://github.com/Souptik2001/all-path-messaging","commit_stats":null,"previous_names":["souptik2001/wp-messaging","souptik2001/all-path-messaging"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Souptik2001%2Fall-path-messaging","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Souptik2001%2Fall-path-messaging/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Souptik2001%2Fall-path-messaging/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Souptik2001%2Fall-path-messaging/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Souptik2001","download_url":"https://codeload.github.com/Souptik2001/all-path-messaging/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234377055,"owners_count":18822439,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["email","sms","wordpress","wordpress-plugin"],"created_at":"2025-01-17T14:40:25.426Z","updated_at":"2025-09-27T03:31:24.310Z","avatar_url":"https://github.com/Souptik2001.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# All Path messaging\n\n![GitHub Actions](https://github.com/Souptik2001/wp-messaging/workflows/Coding%20Standards%20and%20Static%20Analysis/badge.svg)\n\n[Download the WP Plugin ♥](https://wordpress.org/plugins/all-path-messaging/)\n\nLimitless Communication: All-in-one, super scalable, messaging Solution for WordPress.\n\nOk hold on! ✋. So, many words in one line.\nLet's understand each one-by-one.\n\n- **All-in-one:** What do you want? - Email, SMS, push-notification? Get all-in-one.\n  - But I don't want to use `xyz` provider for SMS, I want to use `pqr`, can I have that? Yes it provides you with lot of pre implemented providers for all email, sms and push-notification.\n- **Super Scalable:** But I want to use an email provider named `yxr` you haven't heard the name of. Now what? 🧐\n  - No worries! Are you a developer? If yes, just write your own plugin and implement your own adapter and see it nicely hooked-up with \"WordPress messaging\". Please refer to [this](https://github.com/Souptik2001/wp-messaging/wiki/Create-your-own-Adapter-%F0%9F%9B%A0%EF%B8%8F) section for implementing adapters.\n\nAnd that's how it provides **Limitless communication**! 🚀\n\n[Quick walkthrough video 🎬](https://www.youtube.com/watch?v=80hWdK8kREM)\n\n## Open Source courtesy\n\nA big thank you to these open source projects, which play a crucial role in this project!\n\n- [Utopia Messaging](https://github.com/utopia-php/messaging) - This is literally the backbone of the project. More about it [here](https://github.com/Souptik2001/all-path-messaging?tab=readme-ov-file#special-mention-about-utopia-messaging-package-). 🔥\n- [Travelopia WordPress PHPCS Coding Standards](https://github.com/Travelopia/wordpress-coding-standards-phpcs) - Super cool PHPCS coding standard rules. ✨\n\n## Quick Links\n\n[Setup ⚙️](https://github.com/Souptik2001/wp-messaging/wiki/Setup-%E2%9A%99%EF%B8%8F) | [Issues](https://github.com/Souptik2001/wp-messaging/issues) | [Services and functions 🧩](https://github.com/Souptik2001/wp-messaging/wiki/Services-and-functions-%F0%9F%A7%A9) | [Create your own Adapter 🛠️](https://github.com/Souptik2001/wp-messaging/wiki/Create-your-own-Adapter-%F0%9F%9B%A0%EF%B8%8F)\n\n## WIKI\n\nThe main two ideas of the the plugin are -\n\n#### For Developers -\n\n- To give a simple easy to use  function to send **Email**, **SMS** or **Push Notifications** through the selected adapter.\n- Don't have your desired adapter? No need to wait for me! Go ahead and add the adapter yourself, by just a simple boilerplate code! [See how easy it is to add your own adapter](https://github.com/Souptik2001/all-path-messaging?tab=readme-ov-file#creating-your-own-adapter-%EF%B8%8F)!\n\n#### For users -\n\n- WordPress' default `wp_mail` doesn't deliver your mail reliably? Select any of the available adapters to override `wp_mail` to deliver mails reliably.\n- Already using some email marketing plugin? But not finding your desired provider? And tired of requesting the author to introduce the provider? 😣 - No worries! 🎉 - Have some developer friend, or some coding knowledge? [Learn how easy it is to add your own provider with a simple boilerplate code](https://github.com/Souptik2001/all-path-messaging?tab=readme-ov-file#creating-your-own-adapter-%EF%B8%8F)!\n  - TLDR; Keep using your favorite email marketing plugin, while routing the emails through **All Path Messaging** plugin! 🚀\n\n### Settings page ⚙️\n\nall-path-messaging provides different settings page for each service, under the \"tools\" menu -\n\n![settings-location](./assets/images/settings-location.png)\n\nAnd each settings just contains list of adapters, with their required settings and a radio button to make it the default one -\n\n![settings-sms](./assets/images/settings-sms.png)\n\nThe Email settings just have one extra settings, to choose whether to override the `wp_mail` function or not, using a simple checkbox! -\n\n![settings-email](./assets/images/settings-email.png)\n\nYou are now all set to start using **All Path Messaging**! 🎉\n\n### Services -\n\n#### Email 📧📨\n\nSend an email through a particular adapter (with headers 😉) -\n\n```php\n\\Souptik\\AllPathMessaging\\Email\\send(\n  [ 'dev2@souptik.dev' ],\n  'Yay its working!',\n  'This is some long mail body.',\n  'Souptik',\n  'dev1@souptik.dev',\n  [\n   'cc' =\u003e [\n    [\n     'name'  =\u003e 'CC Test',\n     'email' =\u003e 'cc@souptik.dev',\n    ],\n   ],\n   'attachments' =\u003e [\n    trailingslashit( WP_CONTENT_DIR ) . '/mu-plugins/test-all-path-messaging.php',\n     'SameFileDifferentName.php' =\u003e trailingslashit( WP_CONTENT_DIR ) . '/mu-plugins/test-all-path-messaging.php',\n   ],\n  ],\n  'mailgun'\n );\n```\n\nJust remove the last parameter! And now it uses the default selected adapter -\n\n```php\n\\Souptik\\AllPathMessaging\\Email\\send(\n  [ 'dev2@souptik.dev' ],\n  'Yay its working!',\n  'This is some long mail body.',\n  'Souptik',\n  'dev1@souptik.dev',\n  [\n   'cc' =\u003e [\n    [\n     'name'  =\u003e 'CC Test',\n     'email' =\u003e 'cc@souptik.dev',\n    ],\n   ],\n   'attachments' =\u003e [\n    trailingslashit( WP_CONTENT_DIR ) . '/mu-plugins/test-all-path-messaging.php',\n     'SameFileDifferentName.php' =\u003e trailingslashit( WP_CONTENT_DIR ) . '/mu-plugins/test-all-path-messaging.php',\n   ],\n  ],\n );\n```\n\nChecked the override `wp_mail` checkbox? Try a simple `wp_mail`! -\n\n```php\nwp_mail(\n  [ 'dev2@souptik.dev' ],\n  'Yay its working!',\n  'This is some long mail body - from \u003cstrong\u003ewp_mail\u003c/strong\u003e.',\n  [],\n  []\n );\n```\n\n##### Keep using your favorite email marketing/managing tool ❤️\n\nThe interesting part of this plugin is that it only focuses on solving the smallest purpose it is created for in the most efficient way possible.\n\nFor almost all the email marketing/managing tool there is an option to select how you want to send the email (if there is none, then it by default uses `wp_mail`), like these -\n\n![default-mail-method-example-1](./assets/images/default-mail-method-example-1.png)\n![default-mail-method-example-2](./assets/images/default-mail-method-example-2.png)\n\nIf you are using any other mailer/method in these plugins, just change to this default option and see how seamlessly `all-path-messaging` hooks in and sends emails reliably through your selected adapter! 😎\n\n#### SMS 📲\n\nSend a SMS through a particular adapter -\n\n```php\n\\Souptik\\AllPathMessaging\\SMS\\send( [ '+xxxxxxxxxxxx' ], 'Yay its working!', 'twilio' );\n```\n\nJust remove the last parameter! And now it uses the default selected adapter -\n\n```php\n\\Souptik\\AllPathMessaging\\SMS\\send( [ '+xxxxxxxxxxxx' ], 'Yay its working!' );\n```\n\n#### Push notification 💬\n\nComing soon! ⏳\n\n### Creating your own adapter 🛠️\n\nHere comes the cool part fellow developers! 💻\n\n**Tip:** I have provided a dummy adapter for each service at `inc/\u003cservice\u003e/adapters/dummy/`.\n\nConsider that as the starting point and let's understand what each file does.\n\n- Let's start with `namespace.php`. It is the entry point of your adapter.\n  - In that you will see a simple `bootstrap` function.\n  - In that function we are hooking into `EMAIL_SLUG . '_adapters'` and registering our adapter.\n  - We pass the following data -\n    - `slug`\n    - `name`\n    - `adapter` class object.\n    - `options` - An array defining the settings required for this adapter, which will be used to automatically display the options on the settings page.\n- Next is `class-adapter.php`, which is the Adapter class, which we initialized in the above file and passed it to `adapter`. It contains three simple functions -\n  - `get_settings_fields` - This is the function which returns the array of options, which we used in the above file for `options`. Each option, will have -\n    - The key as the name of the option.\n    - And three values -\n      - `label` - Label to display in the settings page beside the input.\n      - `type` - Type of the field.\n      - `sanitize_callback`\n  - `get_settings` - This function returns an associative array, whose keys are the name of the options and the value as the value of the options.\n  - `get_adapter` - This function will just return the core provider class, which is responsible for processing the message.\n    - First check if `Utopia Messaging` already provides the provider or not [here](https://github.com/utopia-php/messaging?tab=readme-ov-file#adapters), for example `Utopia\\Messaging\\Adapter\\Email\\Mailgun`.\n    - If it is present just use it. Easy peasy! ✨\n    - But if not, let's code it ourself, because `Utopia Messaging` makes it so easy to create a new adapter!\n- `class-dummy.php` is for that purpose, assuming you don't get a provider already present in `Utopia Messaging`.\n  - It's basically a child class of `EmailAdapter` or `SMSAdapter`, which abstract a lot of stuff for us!\n  - Let me explain two main functions, `_construct` and `process`. *Rest of the functions and properties are self-explanatory!* 😉\n    - In the `_construct` function just put the arguments which you want to accept. That's it! And now they will be available everywhere else as `$this-\u003eparam_name`!\n    - The `process` function is the place where you have to write the main logic of calling your providers API to send the message.\n      - As said above all the credentials/data you accepted through constructor are available as `$this-\u003eparam_name`.\n      - Build the `body` and the `headers`.\n      - And then you can use the `$this-\u003erequest` function as demonstrated in the dummy!\n      - Create a response using Utopia's `Response` class.\n      - Handle the errors, populate the response, return! Done! 🚀\n\n### Special mention about \"Utopia Messaging\" package 🙏\n\nThank you message coming soon!\n\n### FAQs\n\n\u003cdetails\u003e\n  \u003csummary\u003e\n    \u003cem\u003e\n      I have a codebase, where I have used `wp_mail`. Do I need to make any changes to the codebase after installing this plugin?\n    \u003c/em\u003e\n  \u003c/summary\u003e\n\n  \u003cbr/\u003e\n\n  \u003cp\u003eGood news - no!\u003c/p\u003e\n  \u003cp\u003eYou just have to check the `Override wp_mail functionality checkbox` in the settings and that's it! All your mails you are triggering through `wp_mail` will be sent through your selected provider!\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\n    \u003cem\u003e\n      I am already using an email marketing plugin. Can I use this plugin to use as the email sending service?\n    \u003c/em\u003e\n  \u003c/summary\u003e\n\n  \u003cbr/\u003e\n\n  \u003cp\u003eAbsolutely!\u003c/p\u003e\n  \u003cp\u003eThe plugin is made for that only! Keep using your existing email marketing plugin and just set the email provider as default (i.e it should use `wp_mail`). And that's it the emails will be send through the desired provider you select in this plugin.\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\n    \u003cem\u003e\n      I need a provider called `xyz`, which is not present currently in this plugin. Do I have to ask you to integrate that?\n    \u003c/em\u003e\n  \u003c/summary\u003e\n\n  \u003cbr/\u003e\n\n  \u003cp\u003eIf you know coding! - You don't have to wait for it! [Go ahead and create your own adapter in your plugin by extending this plugin.](https://github.com/Souptik2001/wp-messaging/wiki/Create-your-own-Adapter-%F0%9F%9B%A0%EF%B8%8F)\u003c/p\u003e\n  \u003cp\u003eIf you are non-tech! - Please create an [issue](https://github.com/Souptik2001/wp-messaging/issues) over here, and I will try to integrate the provider ASAP.\u003c/p\u003e\n\u003c/details\u003e\n\n## Contribute\n\nFeel free to open a issue or pull request if you want to contribute anything to this plugin!\n\nHere is how you can easily setup the project locally! -\n\n- Run `nvm use`.\n- Run `npm run start`.\n- Run `npm run start-env`.\n- That's it. You are ready with your local development environment.\n- To stop your local development setup run `npm run stop-env`.\n- And to completely remove all data related to your local development environment setup run `npm run destroy-env` (Disclaimer: You will loose all your data you created in the local development site).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsouptik2001%2Fall-path-messaging","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsouptik2001%2Fall-path-messaging","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsouptik2001%2Fall-path-messaging/lists"}