trying to extract the subject, body and to from th...
# lucee
s
trying to extract the subject, body and to from the cfmail i tried tis fiddle but something seems not right https://trycf.com/gist/b3d0ed4fbba12d333dd461db8ea2b83d/acf2021?theme=monokai
z
u know how to debug
a
Come on, @Simone you know that "something seems not right" is not how to approach asking for help.
For one thing. It's telling you what the problem is. You don't need us to read an error message to you.
s
but at least i tried, i am debugging on my local, but if i just print it, it seems i am just getting the numbers
so saying how to debug does not mean i am not debugging and i do not know how to debug
i
You are just getting numbers (which is what the error says). That's because the call to refind is just returning positions in the string. Look at the api for reFind function here: https://docs.lucee.org/reference/functions/refind.html
s
exactly, now when i get numbers, i tried using the mid to figure out the positions or and try to fetch it
but it seems failing
z
you can't do subject[1] on a number, thats only for strings. try toString(subject)[1]
just simplify and double check your inputs
a
it seems i am just getting the numbers
Yes. That's what the error says. What is the number? What does it represent? What were you expecting rather than a number? Why? Did you... read the docs to see what you should be expecting? You can answer all these questions yourself before you solicit help from other people. You just need to be methodical.