If you are using Mono for development, then below steps will help you in integrating this Pepipost C# code library in our IDE.
- dotnet SDK (> 2.0)
- mono devel
- Mono-develop IDE
- NETStandard.Library(>= 1.6.1)
- Pepipost
- A free account on Pepipost. If you don't have a one, click here to sign-up and get 30,000 emails free every month.
-
Start mono-develop IDE
-
Select File -> New Solution Or Simply Ctrl+shift+N
Template for new project prompt will appear App -> console application -> Next
-
Give a name to your project
testConsole
Once you have named your project simply click create
-
After Project is successfully created
-
Let's add Nuget package dependencies as described earlier
Select official C# library Pepipost
-
Once all the packages are installed successfully, just copy and paste the simpleUsage.md in your program.cs file present in your project.
Build the project as shown below OR by simply hit F8
-
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
-
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) -
Build the project to finally send your first test email Run the project.
Run the project by hiting Ctrl + F5
If your apikey and sending domain is proper, then response message will be success.
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: