We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Base64 attachments

Hi,

Does anyone know how to attach files to Aspose.Network.MailMessage with base64 Transfer-encoding?

I try to do:
Aspose.Network.Mail.Attachment att = new Aspose.Network.Mail.Attachment(ms, name, contentType);

att.TransferEncoding = Aspose.Network.Mime.TransferEncoding.Base64; <-- Throws exception:

System.Web.HttpUnhandledException. —> Aspose.Network.Mime.MimeException
ved Aspose.Network.Mime.x83903e31fd6d37d2.x1a8fc28556d5eaf8(x6a4692b731b699a0 x721b2192f9b85c66, ContentType x0d1123b65c2cfbc2, xd6224c0caa44176e xf774dbf824e67ba9)
ved Aspose.Network.Mime.x83903e31fd6d37d2.x93f3ea273d3bb46c(x6a4692b731b699a0 x721b2192f9b85c66, ContentType x0d1123b65c2cfbc2, xd6224c0caa44176e xf774dbf824e67ba9, String xc15bd84e01929885)
ved Aspose.Network.Mime.x83903e31fd6d37d2.set_xb5d9330da9e6208d(xd6224c0caa44176e xbcea506a33cf9111)
ved Aspose.Network.Mail.AttachmentBase.set_TransferEncoding(TransferEncoding value)



Never mind, got it by setting the content type to: Content-Type: application/octet;