I've bee using phpmailer for some time now.
But now I want to take it further.
We create marketing pages and want to include it into the $mail->Body function
Like this $mail->Body = include ("index.html");
But this does not work. Is there another method other than recreating the the
whole page as an echo into the body function.
If I can do it as an include then it would be more dynamic and all I have to
do is change my index.html page and when I mail it with phpmailer It changes
If I have to hardcode the index.html file with echoes into the body function I
would have to change it all the time when the original index.html page changes
else the html output to the email would not correspond
That won't work, include() doesn't give output as you want it here (or you'd
have to catch it with output buffering).
Thank you, file_get_contents() works 100%
Just a note to anyone else wanting to do it this way.
It's best not to include css styles in your original html page you want to
mail via phpmailer.
But rather to style your text inside the font tags.
And to use tables to control positioning in the email body instead of css
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.