Jump to content

[SOLVED] How to include Email with HTML content


ngrmm
 Share

Recommended Posts

I have a page which sends out an email based on queries in the url

<?php

	// event ID
	$eventID = $input->get('eventID','int');
	$event = $pages->get($eventID);

	// config
	$adminEmail = "events@test.com";
	$fromEmail = "noreply@test.com";
	$fromName = "test";
	$emailSubject = "Test Email";

	// HTML BODY
	$emailBody = ""; // HOW TO ??? …

	// send mail
	$m = new WireMail();
	$m->to($adminEmail);
	$m->from($fromEmail, $fromName);
	$m->subject($emailSubject);
	$m->bodyHTML($emailBody);
	$m->send();
?>

The email body is a bit complex: standard html/css tables and some php (pw variables).
I put my emailbody (html) in a seperate file emailbody.inc but don't know how to include it?
 

Edited by ngrmm
solved
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...