Are you looking for customized advices? Click here to contact the expert!
by
0
5
1,750
8
Top 1% !
Famous
Tagged
Refined
OpenSource
Popularity: 15955th place
Created
Modified Aug 29, 2018

Published on:

.NETFramework4.0
Architecturex86_64
AreaTransactionalAPI
Extension.cs
LanguageCSharp
LicenseMIT_X11
OSWindows
Windows VersionWindows7

MailUp REST API - How to retrieve information of SMTP+ Users

This snippet takes advantage of the MailUp .NET SDK to setup the secure communication towards the server.
The credentials of the SMTP+ user are passed as parameter in the body of the request.
You can optionally specify a username as third parameter in order to filter the resulting list.
Copy Embed Code
<iframe id="embedFrame" style="width:600px; height:300px;"
src="https://www.snip2code.com/Embed/498951/MailUp-REST-API---How-to-retrieve-inform?startLine=0"></iframe>
Click on the embed code to copy it into your clipboard Width Height
Leave empty to retrieve all the content Start End
public static void GetUserInfo() { // 1) Required values string username = "<your_username>"; string password = "<your_password>"; string clientid = "<your_clientid>"; string clientsecret = "<your_clientsecret>"; string smtpplus_username = "<your_smtpplus_username>"; string smtpplus_password = "<your_smtpplus_password>"; // 2) Setup the MailUp Client: MailUpClient client = new MailUpClient(clientid, clientsecret); client.RetrieveAccessToken( username, password ); // 3) Invoke the web method: List<UserInfoDTO> result = null; try { result = client.ListUserInfo(smtpplus_username, smtpplus_password); } catch (Exception ex) { Console.WriteLine("Cannot perform the operation due to " + ex.Message); return; } // 4) Print results: if (result != null) Console.WriteLine("Retrieved users total:" + result.Count); else Console.WriteLine("An error occurred while retrieving users."); }
If you want to be updated about similar snippets, Sign in and follow our Channels

blog comments powered by Disqus