I’m having a little trouble configuring my mail function. I’ve been trying to set it up so that I can keep my HTML template seperate to my class file. I wanted to do something like the below.
mail('email@email.com', 'subject here', include('email/template.html'), 'from@from.com');
Although it doesn’t seem to like it, is there anyway to do it other than have a really long message string?
Kind regards
try
file_get_contentsinstead ofinclude.includeprocesses the file and outputs to the stream (data going to client), not just returning the contents–otherwise you’d beecho include('...')all the time.Though realistically, if you’re looking for this kind of “advanced” ability (and your host supports it) PEAR Mail is a better option.