Using Delphi 5 I have streamed a PDF document into a blob field (DT image 16). I am now trying to email this PDF to a user as part of the development I working on.
EXEC master..xp_sendmail @recipients = 'me'
@subject = 'Test attachment email',
@message = 'This is the stuff you requested.',
@attachments = 'test.PDF',
@attach_results = 'TRUE',
@no_header = 'TRUE',
@query = 'select doc from PDFTBL WHERE ID=5'
The above does send an email, however when recieved the attachment is not recognised as a PDF, ie when loaded into Adobe it thinks its corrupt.
Any ideas of what I'm doing wrong?