Hello, I am trying to create a custom form and send the information in an email using the email class.
$body = "<p>You've received a contact us submission from the website</p>";
$body .= "<p>Name: {$data['Name']}<br />";
$body .= "Title: {$data['Title']}<br />";
$body .= "Company: {$data['Company']}<br />";
$body .= "Phone: {$data['Phones']}<br />";
$body .= "Fax: {$data['Fax']}<br />";
$body .= "Email: {$data['Email']}<br />";
$body .= "Phone: {$data['Phone']}<br />";
$body .= "Comments: {$data['Comments']}<br />";
$body .= "Product 1: {$products[$data['Product1']]}<br />";
$body .= "Product 2: {$products[$data['Product2']]}<br /><br />";
//print 'email: '.Email::getAdminEmail().'<br><br>';
$email = new Email('no-reply@marketingmessages.com', Email::getAdminEmail(), 'Website Contact Submission', $body);
$email->sendPlain();
That is the code I have and when I run the page I get the following errors.
FATAL ERROR: None of these templates can be found: GenericEmail.ss
At line 53 in C:\wamp\www\marketing_messages\sapphire\core\SSViewer.php
user_error(None of these templates can be found: GenericEmail.ss,512)
user_error at line 53 of SSViewer.php
SSViewer->__construct(GenericEmail)
__construct at line 148 of Email.php
Email->parseVariables()
parseVariables at line 101 of Email.php
Email->debug()
debug at line 117 of ContactUs.php
I don't know if I am using the email class correctly. Thank you in advance for any help.