This is probably a very stupid question but I can't seem to find an answer anywhere. Can php code be used inside the body of a html email?
I have only every used variable names inside an email before i.e.
'<p>Dear'.$name.'</p>
But what if I want to make a table of data and use a loop? Can I put the php loop code in the email html? I have tried but it does not seem to like my syntax no matter what I try.
Just to be clear I have no problems sending the email.