SendGrid

Hi Bradly

The program cannot find the attacment file.

Project Project1.exe raised exception class EFOpenError with message 'Cannot open file "C:\Users\oleek\Documents\Embarcadero\Studio\Projects\Win32\Debug\C".

It always looks for the attachmentfile in the debug directory, even though I point to a valid file using the open dialog.

if opendialog1.execute then
begin
s:=opendialog1.FileName;
showmessage(s); // Shows the correct path here
TMSFNCCloudSendGrid1.Template.AddAttachment(s[1]); // Error, cannot find the file
end;

What am I doing wrong?

Kind regards,
Ole