HTML Email Templates, and extending functionality
Permalink
A client requested that the emails they receive from contact forms be styled in HTML with their logo - along with also sending the user a confirmation email to say that their form submission had been received. The latter doesn't exist as far as I can see, so I overrode the controller with the following:
I've pasted the entirety of it here in case it helps someone - it retains the full functionality of the form piece, but just adds the ability to send them a confirmation email. As such I pass through a template, that I created in the "application/mail" folder, which contains normal and HTML body email content
However, whenever this email sends (and the normal email, of which I added the "$bodyHTML" parameter to), it sends and renders both content pieces in the resulting email. Is there something wrong in my mail template logic, or something wrong in the sender method? OR is it just a problem with gMail interpreting and rendering both?
Thanks,
Dan
<?php namespace Application\Block\Form; defined('C5_EXECUTE') or die("Access Denied."); use Loader; use User; use Page; use UserInfo; use Exception; use Concrete\Block\Form\Controller as FC; class Controller extends FC { public function action_submit_form() { // Get the initial value of the redirect piece $noSubmitFormRedirect = $this->noSubmitFormRedirect;
Viewing 15 lines of 55 lines. View entire code block.
I've pasted the entirety of it here in case it helps someone - it retains the full functionality of the form piece, but just adds the ability to send them a confirmation email. As such I pass through a template, that I created in the "application/mail" folder, which contains normal and HTML body email content
However, whenever this email sends (and the normal email, of which I added the "$bodyHTML" parameter to), it sends and renders both content pieces in the resulting email. Is there something wrong in my mail template logic, or something wrong in the sender method? OR is it just a problem with gMail interpreting and rendering both?
Thanks,
Dan
Anyone encountered this before?