Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#205 2007-03-31 18:26:14

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: [archived] Postmaster -- A simple email-on-post / newsletter manager

Ben,
I’ve read my first post and maybe it was not so clear: I’ll try to be more precise now, after some testing.
Theese are the results I got.

The form I’m using is:

Here is a text warning.
<txp:bab_pm_mime type=“text” />
<txp:bab_pm_data display=“excerpt” />
<txp:bab_pm_mime type=“html” />
<txp:bab_pm_data display=“excerpt_html” />
<txp:bab_pm_unsubscribeLink type=“html” />
<txp:bab_pm_mime type=“end” />

1) email@virgilio.it
in both webmail and outlook the MIME type is treated as text and so are html tags (see my previous post)

2) email@gmail.com
Using the webmail I’m receiving only the sender and the object of the email!! no other text is displayed – the email is blank
If using outlook it looks right except an annoyng blank text attachment (ATT[somerandomnumber].txt).

3) every other mail address
all works well when the message is seen via webmail.
If using outlook it looks right except an annoyng blank text attachment (ATT[somerandomnumber].txt).

P.S.

I confirm that bancroft’s fix doesen’t work for me: the results are the same.

For the record, I’ve even thought it could be an antivirus issue (no, it wasn’t), or a server configuration issue (but my txp diagnostics are fine), or tiny_mce plugin (no, tried disabling it and nothing changes)

Last edited by redbot (2007-03-31 18:45:13)

Offline

#206 2007-04-01 17:33:22

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: [archived] Postmaster -- A simple email-on-post / newsletter manager

Hi Ben,
My testing continues. I’m now using the simplest form

<txp:bab_pm_data />

everithyng seems to go well with every mail address. I receive no more attachments with outlook but there is another problem…
html tags are treated like simple text and I’m quite sure it depends from the hak_tinymce plugin.
I’ve tried the strip_html attribute and nothing changes.

In short, if I use a multipart MIME I have all the symptoms described in my previous post and if I use a text MIME html is not stripped.
Since I’d really like to use this plugin I wonder if it will be possible in a future release to manage to strip html tags from articles created with hak_tinymce so at least I can use it for text emails.
I hope this all makes sense.

Thanks again for your work. I think I’ll put an end to my compulsive posting now ;-)

Last edited by redbot (2007-04-01 17:34:49)

Offline

#207 2007-04-02 18:04:18

benbruce
Plugin Author
Registered: 2006-01-13
Posts: 328
Website

Re: [archived] Postmaster -- A simple email-on-post / newsletter manager

There’s a couple of tangled issues here, redbot, if I’m reading everything correctly.

First, what you place between the <txp:bab_pm_mime type=“text” />
and <txp:bab_pm_mime type=“html” /> tags in your form, will need to be straight text. If it has HTML tags in it (or Textile markup), that will appear in the email. In your example, you have <txp:bab_pm_data display=“excerpt” /> — for that article, do you:

  • have “don’t use Textile” set for the Excerpt field?
  • Is it straight text or have you added any tags or Textile markup?

If you want to use the Excerpt field for both emails, try this:

<txp:bab_pm_mime type=“text” />
<txp:bab_pm_data display=“excerpt_html” strip_html="yes" />
<txp:bab_pm_mime type=“html” />
<txp:bab_pm_data display=“excerpt_html” />
<txp:bab_pm_unsubscribeLink type=“html” />
<txp:bab_pm_mime type=“end” />

Confusing. Again, that “strip_html” attribute needs testing to make sure the emails come out correctly.

The second part is getting your HTML emails to render correctly in many different email programs. This is the root of the “text vs. HTML emails” argument, which I fall on the “send text, point to an HTML web page” solution because of the incredible difficulty. See this article for more. Your efforts to work it out on your systems and email readers may help others, though. We’ll have to start a collection of working versions of forms.

Can folks post their tweaks to the forms to make emails arrive correctly in particular email readers?

  • Ben

Last edited by benbruce (2007-04-02 18:06:24)

Offline

#208 2007-04-03 14:53:02

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: [archived] Postmaster -- A simple email-on-post / newsletter manager

Ben,
thanks for the clarification. Anyway, for what concerns text only emails, I think I’ve discovered why it didn’t manage to strip html tags from excerpts.
As you said I should be using:
<txp:bab_pm_data display=“excerpt_html” strip_html=“yes” />
well… it was simply not working for me and html tags were not stripped at all.
So I had a look at your code and despite my deep ignorance of php I think I found an error in postmaster library.
Around line 236 I changed

if ($display == 'excerpt_html') {
		if (!$Excerpt_html) { return; } else {
			return $Excerpt_html;
		}
	}

to
if ($display == 'excerpt_html') {
		if (!$Excerpt_html) { return; } else {
			if ($strip_html == 'yes') {
				$Excerpt_html = strip_tags(deGlyph($Excerpt_html));	
			}
			return $Excerpt_html;
		}

and now, at least for text only emails, it works perfectly!

Last edited by redbot (2007-04-03 14:55:23)

Offline

#209 2007-04-03 21:44:22

benbruce
Plugin Author
Registered: 2006-01-13
Posts: 328
Website

Re: [archived] Postmaster -- A simple email-on-post / newsletter manager

redbot,

Well done! Yeah, that’s an error, and you’ve figured the fix. I’ll add that bit to my notes for the next version.

That doesn’t resolve your HTML emails rendering correctly, though.

I wish there was a better way to ask everyone who’s using the program a question like that, instead of just posting it here in the forum thread (which not everyone would be checking, obviously).

  • Ben

Offline

#210 2007-04-06 07:24:20

andyflan
New Member
Registered: 2007-04-06
Posts: 6

Re: [archived] Postmaster -- A simple email-on-post / newsletter manager

Hi Ben, great plugin, thanks. I’m going to use this as a snail mail mailing list too, using the custom fields as address fields. I’m going to write some extra code for this so I can export the data to a csv that can then be used in a mail merge locally. Here’s some example SQL that I hope to employ:

SELECT a,b,a+b INTO OUTFILE ‘/tmp/result.txt’ FIELDS TERMINATED BY ‘,’ OPTIONALLY ENCLOSED BY ‘”’ LINES TERMINATED BY ‘\n’ FROM test_table;

Thought I’d just mention that, just in case you’re thinking of including such functionality anyway. Carry on the great work ;)


AndyFlan

Offline

#211 2007-04-12 14:07:43

sugoo
Member
Registered: 2006-05-29
Posts: 20

Re: [archived] Postmaster -- A simple email-on-post / newsletter manager

I’m trying to figure out a way to get date/time information about each subscription into the PM subscriber table in the database… any ideas? Thanks in advance for any help you can offer.

Offline

#212 2007-04-13 08:17:31

Atlas Scruggs
New Member
Registered: 2007-04-13
Posts: 2

Re: [archived] Postmaster -- A simple email-on-post / newsletter manager

Hey, pretty nice little plugin. But you should include in your tutorial to TURN POPUPS ON. The mailing function doesn’t work with popups disabled. And FireFox doesn’t even tell you that it’s trying to pop something up. So this resulted in hours of fun!

Offline

#213 2007-04-13 08:40:45

Atlas Scruggs
New Member
Registered: 2007-04-13
Posts: 2

Re: [archived] Postmaster -- A simple email-on-post / newsletter manager

Also, I side with the people who want to send out the HTML. It’s in all our interests to send out emails that look like the big players’ emails, that have the bulk (or all) of the story in the email itself. I mean, heck, the article is there, it’s just been posted, it would seem like it could be run thru the txp interpreter somehow to be picked up on the other side as html. Maybe I’m just dreaming. But as for all this “text mail vs” stuff, the last time I got a non-html email it was from my grams.

For instance, my current pro bono client has an “action alerts” section. It would be nice if, whatever he is posting to the section (if it’s important), he could simultaneously send out to his email subscribers. Instead of sending out some blank ??? that says click here and find out if what I’m sending you is worth your time.

Offline

#214 2007-04-13 15:27:04

benbruce
Plugin Author
Registered: 2006-01-13
Posts: 328
Website

Re: [archived] Postmaster -- A simple email-on-post / newsletter manager

Atlas,

Postmaster is HTML-capable right now.

The debate of “text vs HTML” is mostly me — It just seems to me that it makes sense to do the simpler, more reliable method. But you are not the only one who disagrees with me (in fact I’m the extreme minority), and Postmaster makes it really easy to send HTML emails. There are actually some neat tricks that are really only possible with HTML emails, too.

Good feedback about the Popups. In the next version this will go away — originally it made sense to pop up the Bulk Mail page, but subsequent changes make it pointless.

Sugoo,

I think this requires a new tag , but it shouldn’t be that difficult. All you need to do is get a hidden input into your form, with the current time as the value (which you then insert into a subscriber custom field). I was toying with it last night and it shouldn’t be too hard. Here’s the bit you need:

  • Enter the following code in your Postmaster plugin code:
function bab_pm_zemTime($atts) {
	$today = date("F j, Y, g:i a");
	extract(lAtts(array(
		'custom_field' => '',
	),$atts));
$form_line = <<<yawp
<input type="hidden" name="$custom_field" value="$today" >
yawp;
	return $form_line;
}
  • Enter this line of code in your subscription form (but choose whichever custom field makes sense to you):

<txp:bab_pm_zemTime custom_field="zemSubscriberCustom2" />

That should be it.

  • Ben

Last edited by benbruce (2007-04-18 23:14:16)

Offline

#215 2007-04-18 11:16:40

kvnmcwebn
Member
From: Ireland
Registered: 2007-01-27
Posts: 724
Website

Re: [archived] Postmaster -- A simple email-on-post / newsletter manager

Im having a problem. When i try to send an article to a subscribers the page/message below gets stuck in a loop, constantly refreshing itself. I let it run overnight once and the next morning the loop had stopped and the page said database not available-this might have been because the connection was interuppted. Im only sending a small article with a jpeg attached to a list with one subscriber so it must be bug somewhere. Maybe i should unistall and reinstall it? Dont know.
>Bulk mail
>Mailing …
>Please don’t close this window until mailing is complete.
>You will receive a written message here when mailing is complete.

dont know
Please advise


its a bad hen that wont scratch itself.
photogallery

Offline

#216 2007-04-18 13:26:46

sugoo
Member
Registered: 2006-05-29
Posts: 20

Re: [archived] Postmaster -- A simple email-on-post / newsletter manager

Ben,

It worked perfectly! Thanks so much for a great plugin and for your generosity and help!

Offline

Board footer

Powered by FluxBB