Dlp.PomboCorreio.Connector 1.2.0

dotnet add package Dlp.PomboCorreio.Connector --version 1.2.0
                    
NuGet\Install-Package Dlp.PomboCorreio.Connector -Version 1.2.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Dlp.PomboCorreio.Connector" Version="1.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Dlp.PomboCorreio.Connector" Version="1.2.0" />
                    
Directory.Packages.props
<PackageReference Include="Dlp.PomboCorreio.Connector" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Dlp.PomboCorreio.Connector --version 1.2.0
                    
#r "nuget: Dlp.PomboCorreio.Connector, 1.2.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Dlp.PomboCorreio.Connector@1.2.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Dlp.PomboCorreio.Connector&version=1.2.0
                    
Install as a Cake Addin
#tool nuget:?package=Dlp.PomboCorreio.Connector&version=1.2.0
                    
Install as a Cake Tool

PomboCorreio-C#-SDK

Usage: Add the following keys to your config file:

<appSettings>
  <add key="PomboCorreio.GimKey"       value="YOUR_GIM_KEY"/>
</appSettings>

To send a email:

PomboCorreioMailManager pcMgr = new PomboCorreioMailManager();

//Create AuthenticationData Object
AuthenticationData authenticationData = new AuthenticationData() {
	Expire = 9999,
	Roles = new List<string>(){
		"send-email"
	}
};

//Generate the new token with your GimKey
PomboResponse authResponse = pcMgr.GenerateToken(authenticationData);
string token = authResponse.Content["token"];

//Create Email 
EmailMessageData emailMessageData = new EmailMessageData { 
	Recipients = new List<EmailContactData>() { 
		new EmailContactData { 
			Address = "murilo.stockinger@stone.com.br"
		} 
	},
	From = new EmailContactData{Address = "murilo.stockinger@stone.com.br"},
	Body = "Teste",
	Subject = "Teste"																	   
};

  PomboResponse response = pcMgr.SendEmail(emailMessageData, token);

To send a SMS is not very different, just create new instance of PomboCorreioSmsManager and call the send method.

Product Compatible and additional computed target framework versions.
.NET Framework net452 is compatible.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.2.0 1,668 3/2/2018
1.1.0 1,518 1/8/2018
1.0.10 1,448 11/8/2017
1.0.9 1,158 10/26/2017
1.0.8 1,120 10/26/2017
1.0.7 1,170 9/26/2017
1.0.6 1,169 9/4/2017
1.0.5 1,192 8/14/2017
1.0.4 1,172 8/10/2017
1.0.3 1,166 8/7/2017
1.0.1 1,190 7/6/2017