C #을 통한 아웃룩 및 썬더버드 이메일 형식 변환
Microsoft® 아웃룩 및 썬더버드 파일 변환 및 파싱을 통한 크로스 플랫폼 .NET 애플리케이션 구축
.NET Email API를 사용하면 Microsoft Outlook을 설치하지 않고도 메시지를 생성, 조작, 처리, 변환 및 전송할 수 있는 기능을 갖춘 크로스 플랫폼 메일 처리 솔루션을 구축할 수 있습니다.®.개발자는 추가, 메시지 개체에서 첨부 파일 가져오기 또는 제거, 제목 변경을 통한 메시지 헤더 사용자 지정, 수신자 추가 또는 제거 등과 같은 기능을 위해 응용 프로그램을 쉽게 개선할 수 있습니다.
이메일을 다양한 파일 형식으로 변환
개발자는 기본 형식 사양을 자세히 살펴보지 않고도 API를 통합하여 이메일 형식을 쉽게 변환할 수 있습니다.를 사용하여 소스를 먼저 로드하면 변환 프로세스가 간단합니다. MailMessage.Load 그리고 전화하기 저장 방법 출력 파일이 있고 SaveOptions.DefaultFormat 매개변수로.
MSG에서 EML로 변환하기 위한 C# 코드
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Load the Message file | |
using (var msgtoEml = MailMessage.Load(dir + "sourceFile.msg")) | |
{ | |
// save in EML format | |
msgtoEml.Save(dir + "convertedfile.eml", SaveOptions.DefaultEml); | |
} |
MSG를 HTML로 변환하기 위한 C# 코드
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Load the Message file | |
using (var msgtoHTML = MailMessage.Load(dir + "GetHTMLFilefrom.msg")) | |
{ | |
// save in HTML formats | |
msgtoHTML.Save(dir + "savefile.html", SaveOptions.DefaultHtml); | |
} |
MSG에서 MHTML로 변환하기 위한 C# 코드
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Load the Message file | |
using (var msgtoMHTML = MailMessage.Load(dir + "ConvertMHTMLFilefrom.msg")) | |
{ | |
// save in MHTML format | |
msgtoMHTML.Save(dir + "output.mhtml", SaveOptions.DefaultMhtml); | |
} |