BJMDesign / silverstripe-mandrill

Silverstripe Mailer using Mandrill API
0 stars 1 forks source link

Issue in SS 3.1 - the method 'cleancustomheaders' does not exist on 'MandrillMailer' #1

Open jbardnz opened 10 years ago

jbardnz commented 10 years ago

Hi

So I have installed this on my SilverStripe 3.1 site and i'm getting a few errors. I have set the plugin in my _config file.

Line 63 on MandrillMailer.php seems to be giving me the error. In fact I have to comment out the following lines which all give errors and then the emails send correctly:

//$this->cleanCustomHeaders($customheaders);

if (!$plainContent) {
    $plainContent = Convert::xml2raw($htmlContent);
}

$from = $this->validEmailAddr($from);
$to = $this->validEmailAddr($to);

//$base64Encoded = $this->isUnicode($htmlContent);
//$bounceAddress = $this->getBounceAddress($from, $customheaders);
//$headers = $this->getStandardHeaders($from, true, $base64Encoded);
//$subject = $this->cleanSubject($subject);

Cheers

HashNotAdam commented 10 years ago

This version of the module was never intended to be developed in a way that could be easily dropped into non-BJM projects.

Saying this, I have been maintaining a fork that is more generic and will continue to use the module for the foreseeable future.

https://github.com/MorningCoffeeDev/silverstripe-mandrill

Should you have any issues with that fork, I'd be happy to help. I actually expect I will be implementing it into another project this week.

jbardnz commented 10 years ago

Hi, Thanks.

I didn't realise this was for BJM projects only, I will take a look at the other module.