10808 Posts in 2494 Topics by 1782 members
Page: 1 2
|Go to End||Next >|
26 June 2009 at 12:51am
I'm trying to send a plain text newsletter using the newsletter module. No matter what I do, even if I make all the send() functions in the newsletter module's code into sendPlain(), it still send out email with a mime part, like this:
This is a multi-part message in MIME format.
Content-Type: text/plain; charset="utf-8"
<p>This is a draft newsletter.</p>
How can I make it so, that it sends out some old-fashioned text email? Thanks!
24 July 2009 at 10:15am
I am having the same problem myself.
Can anyone tell me what's wrong?
6 October 2009 at 1:34pm
6 October 2009 at 10:31pm
try to create a second newsletter template. I guess this one will be in plain text.
I raised that issue some time ago, but unfortunately without any responses.
6 October 2009 at 10:38pm
Thanks for replying and yes, I've seen your post from a while back while I was looking for a solution.
I don't understand your comment though: I can't create a second template in plain text because I can't have two files with the same name in the templates directory. Or am I missing something?
I've managed to get a template happening but the email arrives blank. Unless I *don't* use a template, in which case Outlook displays all the tags.
Not a very good day.
6 October 2009 at 10:48pm
What I intended to say is:
1) Make one template. (you have already one)
2) Copy it and rename it.
Now you have obviously two templates.
If one sends a test newsletter using the 1st template then it will be HTML.
If one sends a test newsletter using the 2nd template then it will be plain text.
I underline: both templates are HTML-templates. Their only difference is their name.
7 October 2009 at 12:15am
Ahh... Now I understand. Thanks for the suggestion.
7 October 2009 at 1:07am
Just a heads up, I was dealing with this the other day and I discovered there's a bug in Silverstripe that will not allow you to send a plain text email. At least not through the Email class.
The problem is the $attachedFiles property. The default value in the class is
protected $attachedFiles = array();
But in the sendPlain() function, there's a check for attached files
// change the content-type to "multipart"
It should be checking if the array has a size -- not that it's just an array. Since the $attachedFiles property is protected, you can't modify its value from outside the class. Therefore, you're forced to have a multipart content-type.
I've sent the bug to Silverstripe.
Page: 1 2
|Go to Top||Next >|