Home > Back-end >  However you parse the data from the email
However you parse the data from the email

Time:08-02

I am very desperate, I need to get data from each new email, which will be saved to a file on my PC, where I will work with it in C#. I really don't know how to get the data. Power Automate was recommended to me, but I don't know how to use it. The only thing I can come up with so far is this the text is split up

but I need to save them to a file.Or is there not some simple or better way to do this? Please help, I really don't know how to go on

CodePudding user response:

You have to install the EAGetMail package from NuGet

Install-Package EAGetMail

EAGetMail is a POP3 and IMAP4 component which supports all operations of POP3/IMAP4/MIME/Exchange Web.

You can find all the information that you need here: enter image description here

Below is my Azure Blob trigger

using System;
using System.IO;
using System.Threading.Tasks;
using Azure.Storage.Blobs;
using Microsoft.Azure.WebJobs;
using Microsoft.Azure.WebJobs.Host;
using Microsoft.Extensions.Logging;

namespace FunctionApp5
{
    public class Function1
    {
        [FunctionName("Function1")]
        public async Task RunAsync([BlobTrigger("container1/{name}", Connection = "ConStr")]Stream myBlob, string name, ILogger log)
        {
            log.LogInformation($"C# Blob trigger function Processed blob\n Name:{name} \n Size: {myBlob.Length} Bytes");
            BlobClient blobClient=new BlobClient("<ConnectionString>", "Container1",name);
            await blobClient.DownloadToAsync("<Local Path>");
        }
    }
}

RESULTS: In my Storage Account

enter image description here

In my local pc

enter image description here

  • Related