Aspose.Email  .NET을 통한 Node.js 용

이메일 처리를 위한 Node.js API

Node.js 애플리케이션 내에서 MSG, EML, EMLX 및 MHT를 포함한 이메일 형식을 생성, 조작 또는 변환합니다.

  
 

Aspose.Email via .NET은 유연하면서도 강력한 이메일 프로그래밍 API로, 개발자가 기본 형식 구현의 복잡성에 대해 걱정하지 않고 일반적인 이메일 메시지 형식을 작성, 조작 또는 변환하는 데 드는 시간과 노력을 절약합니다. Node.js

설치 방법
간단히 실행 npm 설치 @aspose /이메일 최신 버전을 다운로드하고 다음 코드 스니펫 중 하나를 사용해 보십시오.

메시지 파일을 동적으로 변환

이메일 파일을 상호 변환하는 API를 찾고 있다면 .NET을 통한 Node.js 용 Aspose.Email을 선택하는 것이 좋습니다.기본 형식 사양의 보기 흉한 세부 사항은 모두 숨기면서 변환 프로세스를 위한 사용하기 쉬운 인터페이스를 제공합니다.Aspose.Email 객체 모델에서 소스 파일을 로드하고 적절한 파라미터와 함께 Save 메서드를 호출하기만 하면 됩니다.정말 간단합니다!

MSG를 다양한 형식으로 변환

const ae = require('@aspose/email');

const msg= new ae.MailMessage.load("msgtemplate.msg");

// convert MSG to EML, HTML & MHTML formats
msg.save("emloutput.eml", SaveOptions.defaultEml);
msg.save("htmloutput.html", SaveOptions.defaultHtml);
msg.save("mhtoutput.mhtml", SaveOptions.defaultMhtml)
     

예약 ICS 형식에 대한 광범위한 지원

.NET을 통한 Node.js 용 Aspose.Email을 사용하여 약속을 만들고 ICS 형식으로 저장할 수 있습니다.또한 Node.js 이메일 라이브러리를 사용하면 ICS 파일에서 약속을 로드하고, 약속 이벤트를 읽거나 쓰고, 약속을 초안으로 만들고, 약속 참석자의 참가자 상태를 설정할 수 있습니다.

약속 생성 및 저장

const ae = require('@aspose/email');

const attendees = new ae.MailAddressCollection();
attendees.add(new ae.MailAddress("person1@domain.com"));
attendees.add(new ae.MailAddress("person2@domain.com"));
attendees.add(new ae.MailAddress("person3@domain.com"));

// create
const app = new ae.Calendar.Appointment("Room 112",
    new Date(2006, 6, 17, 13, 0, 0),
    new Date(2006, 6, 17, 14, 0, 0),
    new ae.MailAddress("somebody@domain.com"),
    attendees);

app.summary = "Release Meetting";
app.description = "Discuss for the next release";

// save as ICS
const options = new ae.Calendar.AppointmentIcsSaveOptions(); // use default ICS options
app.save("AppointmentInICSFormat_out.ics", options);
     

약속 불러오기

const ae = require('@aspose/email');

const loadedAppointment = ae.Calendar.Appointment.load("Appointment.ics");
// Display the appointment information on screen
console.log("Summary: ", loadedAppointment.summary);
console.log("Location: ", loadedAppointment.location);
console.log("Description: ", loadedAppointment.description);
console.log("Start date::", loadedAppointment.startDate);
console.log("End date:", loadedAppointment.endDate);
console.log("Organizer: ", loadedAppointment.organizer);
console.log("Attendees: ", loadedAppointment.attendees);           
     

iCalendar API를 사용한 회의 제작 및 사용

.NET을 통한 Node.js 용 Aspose.Email은 MSG 및 ICS 형식으로 Outlook 일정 항목을 생성하고 저장하는 기능을 제공합니다.iCalendar 개체를 만들고 저장할 수 있을 뿐만 아니라 모임 요청을 검색, 업데이트, 전송 및 취소할 수 있습니다.또한 직관적인 개체 모델을 사용하면 iCalendar RFC 2445 형식의 되풀이 패턴을 동적으로 생성하고 사용할 수 있습니다.

예약 요청을 생성합니다.세부 정보 보기 here

const ae = require('@aspose/email');

const appWhere = "location";
const appWhen = new Date(2023, 8, 17, 13, 0, 0);
const sender = new ae.MailAddress("from@domain.com");
const recipient = new ae.MailAddress("to@domain.com");
const attendees = new ae.MailAddressCollection();
attendees.add(recipient);

const app = new ae.Calendar.Appointment(appWhere, appWhen, appWhen, sender, attendees);

const message = new ae.MailMessage(sender, recipient);
message.addAlternateView(app.requestApointment());
const msg = ae.Mapi.MapiMessage.fromMailMessage(message);

// Save the appointment.
msg.save("appointment.msg");           
     

PST, OST 및 MBOX 파일 생성 또는 조작

.NET을 통한 Node.js 용 Aspose.Email을 사용하면 PST 및 OST와 같은 Outlook 저장소 파일을 관리할 수 있습니다.기존 저장소 파일에서 여러 작업을 수행하고 처음부터 새 PST 파일을 만들 수 있습니다.가능한 작업에는 폴더 목록, 메시지 목록, 메시지 추출 및 MSG 형식의 연락처가 포함됩니다.

PST 읽기


const ae = require('@aspose/email');

const pst = ae.Storage.Pst.PersonalStorage.fromFile("outlook.pst");
const rootFolders = pst.rootFolder.getSubFolders();

for( folder of rootFolders) {
    console.log("Folder: ", folder.displayName);
    console.log("Total Items: ", folder.contentCount);
    console.log("Total Unread Items: ", folder.contentUnreadCount);
    console.log("----------------------");
    for(msg of folder.enumerateMessages()) {
        console.log("  ", msg.subject);
    }
}
     

아웃룩 저장소 파일과 함께, .NET을 통한 Node.js 용 Aspose.Email은 Mbox 파일 형식도 지원합니다..NET을 통해 Node.js 용 Aspose.Email을 사용하여 기존 Mbox 파일을 로드하고 메시지 정보를 추출할 수 있습니다.

Mbox에서 메시지 추출

var ae = require('@aspose/email');

const options = new ae.Storage.Mbox.MboxLoadOptions(); // using default options
const reader = new ae.Storage.Mbox.MboxrdStorageReader("Inbox.mbox", options);
let index = 0;
//  Read all messages in a loop
for(eml of reader.enumerateMessages() ) {
    console.log("Subject: ", eml.subject);

    // save message in EML & MSG format
    eml.save(`${index}_output.eml`, ae.SaveOptions.defaultEml);
    eml.save(`${index}_output.msg`, ae.SaveOptions.defaultMsgUnicode);
    ++index;
}
      
  

  
  

Aspose.Email은 다음과 같이 널리 사용되는 다른 개발 환경을 위한 개별 이메일 API를 제공합니다.