steviez Posted December 11, 2007 Share Posted December 11, 2007 Hi, I need to pull my email templates from a database, the only problem is that some of the email templates will have php code in them. Is there anyway this can be done? Here is a sample of one of my email templates used for registration. <html> <head> <title>Welcome!</title> </head> <body> <p>Thanks for becoming a member at ".$settings['site_name']." ".$_POST['username']."!<br /> Your account has been set up, You need to activate your account in order to use it. Please click on the link below to activate your account<br><br> <a href='".$settings['site_url']."/validate/".$_POST['username']."/".$validation."'>".$settings['site_url']."/validate/".$_POST['username']."/".$validation."</a> </p> <P>Please stay tuned and keep an eye out for some new exiting features!</p> <p>You are receiving this e-mail because you or someone else used your address to sign up on our site.<br/>If you did not sign up on our site, just ignore this message and please accept our apologies.<br/><br/> Best regards,<br/> </p> </body> </html> Thanks in advance Quote Link to comment Share on other sites More sharing options...
phpQuestioner Posted December 11, 2007 Share Posted December 11, 2007 all you should have to do is echo out the database variable that contains the code (html content and/or php variables). I have used a basic php echo in a database field before and it seemed to work out ok; I never have done anything really advanced this way; but I think you should be able to accomplish this. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.