I have a byte[]
with the contents of file. I would like to send it as an attachment using System.Net.Mail
.
I noticed the attachment class has 1 overload which accepts a stream.
Attachment att = new Attachment(Stream contentStream,string name);
Is it possible to pass the byte[]
through this overload?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…