Skip to content

Latest commit

 

History

History
executable file
·
104 lines (53 loc) · 4.82 KB

visual-studio-installation.md

File metadata and controls

executable file
·
104 lines (53 loc) · 4.82 KB

Step to integrate Pepipost C# .Net library with Visual Studio 2017 using Git (Without any package manager/Nuget)

If you are using Visual Studio for development and want to integrated with Pepipost directly by using Git, then below steps will help you in integrating this Pepipost C# code library in our IDE.

Prerequisites

How to Build

  1. Download Pepipost SDK

    Unzip the SDK on any Location of your choice (we will unzipped in directory named testSDK)

    OR git clone https://github.com/pepipost/pepipost-sdk-csharp.git

  2. For starting a new project, right click on the current solution from the Solution Explorer

    Choose Add -> New Project.

    s1

    s2

    s3

    s4

    s5

  3. Next, choose "Console Application", provide a TestConsoleProject as the project name and click OK.

    Set the new cosole project as the start up project

  4. Set as startup project

    The new console project is the entry point for the eventual execution. This requires us to set the TestConsoleProject as the start-up project.

    To do this, right-click on the TestConsoleProject

    Choose Set as StartUp Project from the context menu.

    s7

  5. Add reference of the library project

    In order to use the Pepipost C# library in the new project, first we need to add a projet reference to the TestConsoleProject.

    First, right click on the References node in the Solution Explorer

    Click Add Reference.

    This Opens the references for the TestConsoleProject

    Next, a window will be displayed where we must set the Checkbox on PepipostAPI.Standard

    Click OK.

    By doing this, we have added a reference of the PepipostAPI.Standard project into the new TestConsoleProject.

    Add a reference to the TestConsoleProject

  6. Once all the packages are installed and TestConsoleProject is created, a file named Program.cs will be visible in the Solution Explorer with an empty Main method.

This is the entry point for the execution of the entire solution.

Here, you can add simpleUsage.md code

Add a reference to the TestConsoleProject

  1. Update the api_key and FromEmail parameters:

    • apikey: This will be available under: Login to your Pepipost account -> Settings -> Integration
    • FromEmail: If your fromemail address is e.g. info@mydomain.com, then the Sending Domain mydomain need to be verified and active under your Pepipost account. You can manage the Sending Domain under: Login to Pepipost -> Settings -> Sending Domains
  2. Change apiKey and FromEmail in your script:

    string apiKey = "XXXXX-your-api-key-XXXX" (near by line no 25 if your have copy the simpleUsage.md)

    body_personalizations_0.Recipient = "your recipient emailid here" (near by line no 31)

    body.From.FromEmail = "info@ your-verified-domain" (near by line no 37)

  3. Build the project to finally send your first test email Run the project.

    build

    Run the project by hiting Ctrl + F5

    If your apikey and sending domain is proper, then response message will be success.

    s7

    Hope, you have received your first test email 😃

    If there is some problem related with config, then you will receive error message as shown below:

    mono10