I've added this code to my email sending function.
On the Line FileManagment.BLOBExport(TempBlob,'C:\Users\LewisH.TIOGA-DOMAIN\Signature',FALSE); thats where I want it to retrieve the image from. Within the BlobExport Function how can i change it to attach the image from that path?
recCompanyInfo.CALCFIELDS(Picture);
IF recCompanyInfo.Picture.HASVALUE THEN BEGIN
TempBlob.INIT;
TempBlob.Blob := recCompanyInfo.Picture;
TempBlob.INSERT;
FileName := FileManagment.BLOBExport(TempBlob,'C:\Users\LewisH.TIOGA-DOMAIN\Signature',FALSE);
END;
cuSMTP.AppendBody('<IMG style="HEIGHT: 153px; WIDTH: 445px" src="file:///'+ FileName +'"'+ 'width=100 height=100>');
cuSMTP.Send;
BlobExport Code:
BLOBRef.Blob.CREATEINSTREAM(NVInStream);
IF STRPOS(Name,'*') = 0 THEN
ToFile := Name
ELSE BEGIN
ToFile := INSSTR(Name,Text001,1);
ToFile := DELCHR(ToFile,'=','*');
END;
WHILE STRPOS(ToFile,'\') <> 0 DO BEGIN
p := STRPOS(ToFile,'\');
ToFile := COPYSTR(ToFile,p + 1);
END;
Path := 'C:\TEMP';
IF NOT CommonDialog THEN
Path := Magicpath;
DOWNLOADFROMSTREAM(NVInStream,Text006,Path,GetToFilterText('',Name),ToFile);
EXIT(ToFile);