나는 byte[] 파일의 내용을. 을 (를) 사용하여 첨부 파일로 보내고 싶습니다 System.Net.Mail.
첨부 클래스에 스트림을 허용하는 오버로드가 1 개 있음을 알았습니다.
Attachment att = new Attachment(Stream contentStream,string name);
byte[]이 과부하 를 통과 할 수 있습니까?
BTW, 첨부 파일의 다른 속성 (예 : CreationDate)을 설정하려는 경우 att.ContentDisposition을 사용할 수도 있습니다.
—
John Gilmer