Skip to content

Instantly share code, notes, and snippets.

@dima-hx
dima-hx / some.cs
Created April 14, 2022 09:03
Add Attachment base64 image in MailMessage
private static AlternateView ContentToAlternateView(string content)
{
Stream Base64ToImageStream(string base64String)
{
byte[] imageBytes = Convert.FromBase64String(base64String);
MemoryStream ms = new MemoryStream(imageBytes, 0, imageBytes.Length);
return ms;
}
var imgCount = 0;
@dima-hx
dima-hx / Program.cs
Created April 4, 2020 19:38
PM IT PUMP task
using System;
using System.Linq;
using System.Net.Http;
using System.Threading.Tasks;
namespace PMITPUMP
{
class Program
{
private static HttpClient httpClient {get;} = new HttpClient();