Reputation: 217
My company has a C# .Net based web service for sending email. This web service does not currently support attachments. We have many old ASP Classic pages that are still using CDONTS for sending emails (including ones with attachments). My current task is to find out if we can add attachment support to the web service such that we can replace the ASP Classic CDONTS with calls to the web service. What I'm getting hung up on is this: is it possible to pass those files that need to be attached to the web service from ASP Classic.
Any help is appreciate: I've found lots of articles describing half of what I need to do, or only approaching it from a .Net-to-.Net angle.
Upvotes: 1
Views: 500
Reputation: 2785
you could use the adodb.stream object to convert binary data into a byte array:
Function ReadByteArray(strFileName)
Const adTypeBinary = 1
Dim bin : Set bin = Server.CreateObject("ADODB.Stream")
bin.Type = adTypeBinary
bin.Open
bin.LoadFromFile strFileName
ReadByteArray = bin.Read
End Function
Upvotes: 1