×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: activating cmandrill breaks template

activating cmandrill breaks template 2 years 2 months ago #31657

  • anand mahey
  • anand mahey's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 2
  • Thank you received: 0
My System info:
Joomla: 3.4.3
Fox Contact: 3.4.4
Cmandrill Version: 4.0.0

Hello. I have been using Cmandrill for awhile now, together with Fox Contact.
Upon updating both Fox Contact and Cmandrill, for some reason mails keep getting sent and received as plain text with HTML & CSS codes. Upon disabling CMandrill, it works fine.

Please advise.

activating cmandrill breaks template 2 years 2 months ago #31677

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 154
  • Thank you received: 1081
hm. Do you have some kind of a template set for fox contact in CMandrill?
The following user(s) said Thank You: Stefan Basting

activating cmandrill breaks template 2 years 2 months ago #31685

  • anand mahey
  • anand mahey's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 2
  • Thank you received: 0
Hello, Thank you for replying

I don't have a template set in CMandrill for Fox Contact. However, Fox Contact itself has a template which it automatically applies to all emails. It can be viewed here:

Fox Contact Template

In fact i have verified that the update in Fox Contact now applies a template to emails.

There might be a conflict there? CMandrill looks for a template - No Template looks for Global Template - No Global Template sends as plain text. I think this is where the problem is.

Is there any way to stop CMandrill looking for a template within CMandrill completely? If this could be a feature, where the user can turn off CMandrill Templates, and CMandrill looking for Templates, and it only does the Transactional Emails it would be fantastic.

Thank you

activating cmandrill breaks template 2 years 2 months ago #31688

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 154
  • Thank you received: 1081
No, that is not really true. No matter if we find a template or not, we always do this check:
if ($this->ContentType == 'text/plain')
		{
			$message['text'] = $this->Body;
		}
		else
		{
			$message['html'] = $this->Body;
			$message['auto_text'] = true;
		}

If the mail is supposed to be sent as html, we'll send it as html. Otherwise as plain text. my guess is that when Fox Contact is calling sendMail, they are not setting t he $mode to true. If the mode is set to true, then the contentType is set to html, otherweise it is text/plain.

Regards,
Daniel
  • Page:
  • 1
Time to create page: 0.119 seconds