This doc is dedicated to all terminal lovers who ❤️ to code on terminal.
Below steps will help you in integrating this PHP code library on a Windows machine which doesn't have any IDE.
Optional Note: This library will be sending HTTP calls to Pepipost server and hence if you're running any firewalls on your machine, then please whitelist the API base URL
api.pepipost.com
withport 443/80
This code has dependencies over external libraries like UniRest. All dependencies are listed in the file composer.json
.
We are trying to cover each of the steps in this installation, which might make this doc a little lengther but the objective is to help you with the simpliest way of installation.
While Pepipost DX Team is defintely leading this library, but we want this to be more community driven. Your help is needed to realize this goal and to make sure we are building the right things in the right order. We ask that you create issues and pull requests or simply upvote or comment on existing issues or pull requests to keep everyone updated.
We appreciate your continued support, thank you! Let's move ahead on the installation steps:
-
Install XAMPP. Skip this step, in case you already have the PHP installed.
-
Install COMPOSER.
2.1. As soon as you download composer.exe file from the above link pop will appear below:
2.2. Installation directory will be shown at the below:
2.3. Proxy URL if you want any, we don't want such for now so keeping blank
2.4. Last process will prompt for Ready to install
2.5. Downloading Procedure
2.6. Last Legacy installation Finish (Successfully installed)
-
Open Command Prompt (CMD) & check Composer version using
Composer --version
(command prompt) -
Download zip or clone git repo from Pepipost Repository
-
Unzip the downloaded zip to Fresh Directory at any location of your choice. (we will assume Dev has Directory at location Desktop)
- Copy the path from address bar of window where you have unzipped the repository
- Paste in CMD with
cd copied\PATH\to\Directory
- Once you had copied & successfully migrated to Unzipped Path
install composer using composer install
these will install all the requirement for Building SDK
- Download CURL (https://curl.haxx.se/docs/caextract.html) for windows
move .pem from downloads directory to the unzipped SDK folder.
- As we have downloaded the Curl we need to add in our php.ini file
Open xampp Control panel -> config(php.ini) file shown below
- Add line
**curl.cainfo = "PATH_TO/cacert.pem"**
to php.ini file
- Make a Sample file named test.php in the unzipped directory as shown below
-
Open file with notepad (for simpliest debugging would like to recommend :: notepad++ (https://notepad-plus-plus.org/download/v7.5.8.html))
-
Copy and paste Simple Usage example from simpleUsage.php in test.php
-
Make changes in the file (replace/add your credentials available from panel)
15.1. Get api_key from Panel
replace line $apiKey = 'api-XX-key-XX-here'
in SimpleUsage with $apiKey = 'api-key-from-panel refer the image below'
15.2. Get Sending Domain from panel (should be verified/Active)
replace $body->from->fromEmail = 'admin@myfirsttest.com'
with $body->from->fromEmail = 'admin@domain-from-panel-refer-image-below
-
Ready to Go..! Save you File and open CMD -> cd Path\to\Unzipped\directory
Check Syntax by C:\xampp\php\php.exe -l Path\to\Unzipped\directory\test.php
Syntax ok will be prompted if everything is correct in your test.php file
Send your first mail now with C:\xampp\php\php.exe Path\to\Unzipped\directory\test.php
-
Check your Email Inbox (please mark as not spam if it is found in spam)
-
Success :: You have Successfully Integrated Pepipost 😃 .