10387 Posts in 2199 Topics by 1712 members
| Go to End | Next > | |
| Author | Topic: | 2085 Views |
-
Sending a plain text newsletter

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.
------=_NextPart_198359570119
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable<p>This is a draft newsletter.</p>
------=_NextPart_198359570119--How can I make it so, that it sends out some old-fashioned text email? Thanks!
-
Re: Sending a plain text newsletter

24 July 2009 at 10:15am
*bump*
I am having the same problem myself.
Can anyone tell me what's wrong?
-
Re: Sending a plain text newsletter

6 October 2009 at 10:31pm
Hi _Vince
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.
See here: http://silverstripe.org/all-other-modules/show/266217
-
Re: Sending a plain text newsletter

6 October 2009 at 10:38pm
Freedolin:
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.
-
Re: Sending a plain text newsletter

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.
-
Re: Sending a plain text newsletter

7 October 2009 at 12:15am
Ahh... Now I understand. Thanks for the suggestion.
-
Re: Sending a plain text newsletter

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
if(is_array($attachedFiles))
// 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.
| 2085 Views | ||
| Go to Top | Next > |



