I'm trying to attach a file with AttachFile AMPScript but looks like I'm missing something.
here is my code:
%%[
set @billingUrl = RequestParameter("billingUrl")
]%%
<!-- it works, but I need the request params value -->
%%= AttachFile('HTTP', 'http://example.com/static-url.pdf') =%%
<!-- it doesn't work and do not send emails -->
%%= AttachFile('HTTP', v(@billingUrl), 'fatura.pdf') =%%
or
%%= AttachFile('HTTP', @billingUrl, 'fatura.pdf') =%%
or
%%= AttachFile('HTTP', {{billingUrl}}, 'fatura.pdf') =%%
<!-- it works -->
url: %%=v(@billingUrl)=%%
<!-- it works -->
url: {{billingUrl}}
What am I missing here?
%%= AttachFile('HTTP', v(@billingUrl), 'fatura.pdf') =%%
wont work as that how you call the value of a variable from outside the block not within it%%= AttachFile('HTTP', '@billingUrl', 'fatura.pdf') =%%