A show-stopper bug has been identified with subscribe2 2.2.1, completely breaking the plugin when used with the DREAMHOST setting enabled.
subscribe2 2.2.2 is now available.
- Fixed operation with the
DREAMHOSTconfiguration - Added a toggle to enable or disable display of the subscribe2 button on the Write screen's toolbar
- Tidied up the display of the form for better XHTML compliance
Please report any problems in the comments.
Skippy I can't thank you enough for this plug-in and the Dreamhost fix!!!
Thanks for pointing out the problem to me, JMW! I'm glad you like the plugin.
I'm having another problem...
I can't do a test subscribe...
I type in a email address.. get a "sent confirm email"
recieve the email then click the link, and just go back to the normal subscribe page... and my email address is still unconfirmed.
I have changed line 42 of subscribe2.php to "10" which is the page id of my subscribe page...
JMW: where's your subscribe page?
Doesn't fix my problem, I'm afraid. I can't figure out where those DEL tags are coming from. I had a look in the database and the token is fine and intact in there.
Is there a priority setting in the plugin? Maybe if it ran before Textile...
Nobody else has this problem (token not being parsed)?
Cheers,
Anthony
Skippy,
I installed the image titles from Coldforged and my email notifications stopped. Are you aware of any conflict?
Here is the link to the subscribe page...
http://www.wordsoftestimony.com/email-list-subscription/
Any ideas? (I think I will try uninstalling and reinstalling everything, it might work)
Anthony: I don't see why textile would break a plain HTML comment. If you disable textile, does the token work correctly?
BigDog: I am not aware of any conflict with other plugins. Do email notifications work if you disable ColdForged's plugin?
JMW: for some reason, your site is completely discarding the query string when loaded from the site root. For example, this URL fails, showing the subscribe page instead:
http://www.wordsoftestimony.com/?s2=1<MD5>
But this URL works:
http://www.wordsoftestimony.com/email-list-subscription/?s2=1<MD5>
I suspect there's a problem with overly aggressive rewrite rules. I can't fix that for you immediately, unfortunately. One possible solution would be to have subscribe2 use the permalink to the subscribe page if it's defined. Please send me an email, to which I will reply with a modified version of subscribe2.php for you to test.
Hey we fixed it!! Because of your comments and suspicions, I remembered that I had this plug-in...
http://fucoder.com/code/permalink-redirect/
installed and activated...
I deactivated it and the problem is gone!
(I had this installed as the work around for earlier versions of Subscribe2 and the WordPress draft conflict. I never deactivated when I upgraded because I figured it wouldn't hurt. Now we know.)
Thanks again Skippy!
Hey Skippy,
I can't thank you enough for the Subscribe2 plugin!
I'm having a minor (major) problem with the subscription confirmation service...
The confirmation email sends a link that looks like this
http://bc.gdc.net/blog/wp?s2=
which gives a 403 forbidden error. When I manually change the URL to: http://bc.gdc.net/blog/?s2= the subscription goes ahead as intended.
The only thing I can see causing this is my blog is set up to have the home page in a different directory than the WordPress install. The index.php is in /htdocs/index.php and the WordPress install is in /htdocs/wp/
Do you have any suggestions?
Thanks!
Brandon
Thanks so much for the toggle to enable or disable display of the subscribe2 button.
You're awesome! :)
Hi again from Spain Skipy,
at the end wp-cron and daily digest works like a charm!
I'm very grateful.
I keep asking for a feature, I beg you for this feature:
- Weekly digest
I know, you told me you have no plan of doing it. I think it would be a good improvement for Blogs with a lot of posts by day. Users feel so overwhelm.
Maybe if you could give me some hints, indications for coding it, I could try to do it by my self, and then share with all of you. I'm not a PHP coder, but I understand code, so I can learn fast.
What do you think about it?
please, please, please
begging please.
;)
Sorry for being so tiring
smdani: how much is the weekly digest feature worth to you? There are two ways one could add weekly digests: 1) modify subscribe2 to track how many cron_daily actions it has peformed, and send the digest as needed; 2) add a weekly action to wp_cron and connect subscribe2 to that.
I'm not keen on making substantial changes to WP-Cron at this time, because a psuedo-cron facility is being added into the core of WordPress itself. This cron is different from my own implementation, so whatever I do to WP-Cron will ultimately be made obsolete.
Yup, it's Textile. Disabling it does make the form display. I'm using version 2.06b - I tried rolling back to version 2.0b but it has the same problem.
Unfortunately, I've been using Textile for so long that if I disable it my site looks like gibberish. Is there any hope for me?
Cheers,
Anthony
Skippy: so, do you think is coming a schedule feature like wp-cron on future releases of WP?
Hi
Been looking for a plugin to deal with subscribers - if i have already registered a bunch - do they need to be imported into the new database or does this plugin work off the exsisting databse ?
Thanks in advance
gMk
I have some problems with that plugin. :-( First: I imported 15 mail-adresses and NO ONE gets a newsletter; only myself (admin) and my office adress works. I activated the daily digest option, is there a bug in this function?
Then after subscribing and activating I return to a page with ALL pages shown one after another... Can I configure to show a blank page or something?
Daniel
I fixed the problem with the pages; did not see the variable in the php... ;-)
smdani: yes, future versions of WordPress will include a scheduler function.
grandMasterKrust: subscribe2 uses its own table for public subscribers. There is a bulk-import utility on the subscribe2 options screen, which allows you to paste in a list of comma- or newline-separated subscribers. subscribe2 also allows registered users of the site to subscribe to update notifications.
skippy: While waiting for that schedule feature I'll try to add weekly digest on wp-cron.
I have code some lines in wp-cron.php in order to add weekly control. do you think this is a correct code?:
FILE: wp-cron.php
function wp_cron_init() {
// first, get the current time
$wp_cron_now = time();
$this_year = date('Y', $wp_cron_now);
$this_month = date('m', $wp_cron_now);
$this_day = date('d', $wp_cron_now);
$this_day_week = ((int)($this_day/7))*7:
if ($this_day_week==0) {
$this_day_week=1;
}
$this_hour = date('h', $wp_cron_now);
$daily = mktime(17, 15, 1, $this_month, $this_day, $this_year);
$hourly = mktime($this_hour, 0, 0, $this_month, $this_day, $this_year);
MODWEEKLY $weekly=mktime(17, 15, 1, $this_month, $this_day_week, $this_year);
// fetch the timestamps
if ( (FALSE === get_option('wp_cron_15_lastrun'))
|| (FALSE === get_option('wp_cron_hourly_lastrun'))
|| (FALSE === get_option('wp_cron_daily_lastrun'))
|| (FALSE === get_option('wp_cron_weekly_lastrun')))
{
update_option('wp_cron_15_lastrun', $wp_cron_now);
update_option('wp_cron_hourly_lastrun', $hourly);
update_option('wp_cron_daily_lastrun', $daily);
update_option('wp_cron_weekly_lastrun', $weekly);
}
$wp_cron_15_lastrun = intval(get_option('wp_cron_15_lastrun'));
$wp_cron_hourly_lastrun = intval(get_option('wp_cron_hourly_lastrun'));
$wp_cron_daily_lastrun = intval(get_option('wp_cron_daily_lastrun'));
$wp_cron_weekly_lastrun = intval(get_option('wp_cron_weekly_lastrun'));
if ($wp_cron_now > ($wp_cron_daily_lastrun + 86400)) {
update_option('wp_cron_daily_lastrun', $daily);
add_action('shutdown', 'wp_cron_daily_exec');
}
if ($wp_cron_now > ($wp_cron_hourly_lastrun + 3600)) {
update_option('wp_cron_hourly_lastrun', $hourly);
add_action('shutdown', 'wp_cron_hourly_exec');
}
if ($wp_cron_now > ($wp_cron_15_lastrun + 900)) {
update_option('wp_cron_15_lastrun', $wp_cron_now);
add_action('shutdown', 'wp_cron_15_exec');
}
if ($wp_cron_now > ($wp_cron_weekly_lastrun + 604800)) {
update_option('wp_cron_weekly_lastrun', $weekly);
add_action('shutdown', 'wp_cron_weekly_exec');
}
}
//////////////////////////
// these execute the various hooks
function wp_cron_15_exec() {
do_action('wp_cron_15');
}
function wp_cron_hourly_exec() {
do_action('wp_cron_hourly');
}
function wp_cron_daily_exec() {
do_action('wp_cron_daily');
}
function wp_cron_weekly_exec() {
do_action('wp_cron_weekly');
}
?>
and in
FILE: subscribe2.php I have changed these lines(aprox. 1500):
$yesterday = date('Y-m-d', (get_option('wp_cron_daily_lastrun')-60));
$posts = $wpdb->get_results("SELECT ID, post_title, post_excerpt, post_content FROM $wpdb->posts WHERE post_date > '$yesterday 00:00:00' AND post_date get_results("SELECT ID, post_title, post_excerpt, post_content FROM $wpdb->posts WHERE post_date > '$oneweekago 00:00:00' AND post_date
Daniel: I'm not aware of any outstanding bugs that would prevent message delivery. Other people are successfully using the digest feature. If some recipients recieve email, but some don't, the problem is either spam filters, or some mail delivery hiccup outside the scope of subscribe2.
smdani: the code looks okay to me, but I haven't tested it.
Hello!
The readme.txt explain :Subscribe2 supports two classes of subscribers: the general public, and registered users of the blog.
I have made a clean install of the last version 2.2.2 on WP2 but only the registered users of the site receive mail. The subscribers receive nothing
MilleSabords: are the general public subscribers confirmed?
i have your plugin installed on on a windows platform. It seems to be all configured but i do not get any email. Please let me know how to trouble shoot this issue? Does your plugin need wpphpmailer also?
I got the plugin installed. I was able to "Send email to all subscribers" but it only seems as if it is going to the admin account. I have 3 confirmed users and the "admin" account is one of those email addresses. The admin account gets the email. But the others don't
Also when I post I don't get any emails?
Yes, my subscribers are confirmed
Skippy,
I disabled the Cold Forged PI and it did not change things. Strange, after I wrote you I received a few emails and then it stopped again.
I tried to disable every new plug in or change I have made in the last few days but nothing has helped.
I am using WP PHP mailer and have it set to SMTP (which I have had all along). If I try to send a test email it does not go through but if I change it to WP mail it does.
The instructions for the upgrade phpmailer say that there can be no other PI using WP mail. Would that be the conflict?
Now I've got nothing.
Don't know what happened but will keep plugging (no pun intended) at it.
Well, I disabled WPphpmailer and I can send emails through the write panel but none are sent for a post.
Still working on it
Skip,
Did the latest change the data base at all? If so, what are the new tables and how does one accomplish the task? I am not sure but I think that mine are not updated.
Can send test emails but the php mailer seems to kaput so I am going through the wp mail.
I think I had this working with the last version. Maybe I will revert and see if that makes any difference.
Big Dog: no, the database has not changed for any of the 2.2.x releases.
Thank you, we absolutely love and use Subscribe2 2.2.0 on WP2.0. But when we tried to upgrade to version 2.2.2 we got:
Fatal error: Call to undefined function: get_userdata() in /homepages/htdocs/hotnudeyoga.com/blog/wp-content/plugins/subscribe2/subscribe2.php on line 822
FireIslandMan:
get_userdata()is defined in/wp-includes/pluggable-functions.phpat line 58. I don't have any idea why you're getting that error.Seems to be working fine now. Got rid of WP PHPmailer and it started working. Other than that I don't know what I did.
Thanks
BD
Hello skippy,
thanks for the tool. It is easy to install and to manage for my needs. But I had some slight problems with V 2.2.2
1) Only registered user can subscribe and decide between plain or html email. The subsribtion is no problem. But the email the user get ist quite the opposite he marked in his subscribtion. Html instead of plain or plain instead of html.
2) I get only emails, when a message is posted the first time. When the message is editet a second time or more important for me, if a comment is posted no email is sent. Is this a bug or a feature? :-) For me it is important to get notifications if a comment is written.
Thanks for your help
Joerg
Just a little thing: version 2.2.2 has define('S2VERSION', '2.2.1');
I'm trying to get the Spanish language translation file to work. I've put it in the subscribe2 folder, but the interface and the user instructions remain in English...
Skippy,
I hate to be a PITA but it seems the notifications I was getting are the ones WP send automatically when I post. My subscribers said they have not gotten emails for my posts.
I was doing OK with the last version (I do not have Dreamhost) so it started after I upgraded. If I go back the subscription link (page) becomes unfunctional.
One more thing. I was trying to test the system by sending a message from the write--> send email option and I am the only one who got it.
I am beginning to wonder if there is some kind of loop (for lack of a better word) problem that is not grabbing the other email.
Anyway, I am at a loss.
I am unable to provide support at this time. I don't know when -- if ever -- I will resume support of subscribe2, or any other plugin.
The fact of the matter is, the sheer number of variables at play on the various hosts, combined with the consistently poor diagnostic reports from users ("It doesn't work!"), make it nearly impossible for me to fix every problem.
If subscribe2 works for you, then I am happy. If susbcribe2 does not work for you, please accept my apologies, and try a different plugin.
Thanks Skippy for all the hard work you have put into these. I imagine there are hundreds of requests for help and I appreciate all you have done to help me.
I hope you are busy with your real life and have not been driven to the edge by me :)
Warmest regards,
BD
Just remember that there are many of us silently appreciating your work skippy. I am grateful for all your work on your excellent plugins.
Hi skippy,
dont get scared! I dont come to beg you weekly subscription, he he.
Only for reporting a problem on daily subscriptions:
- When sending the same mail to a lot of addressed from the same domain, server reject it because its been considered spam.
A solution, could be create one mail for each person, and send it personalized: FROM: Author mail TO: subscriber mail
My contact form is not appearing on my contact page. Here's the code I'm using for that page:
Get email notifications when Casey's World is updated!The previous comment didn't include my HTML:
Get email notifications when Casey's World is updated!
smdani: I will never implement per-subscriber deliveries.
What would be the HTML to manually put the subscribe form in a page?
Skippy - Is there anyway I can direct subscribe2.php to call a specific page when someone unsubscribes, just like they do when they subscribe?
Maybe I missed it somewhere.
I'm lovin the plugin!
Just upgraded to wordpress 2.0.1 and upgraded to the newest subscriber plugin and I'm still getting the same problem as I was before with wordpress 1.5.
Hi! I have subscribe 2.1.7a installed on wordpress 1.5.2. Subscribe 2 only sends out emails to the webmaster@pilotjohn.com and no one on the subscribe list. I have like 3 different email accounts to test it added and none of them receive anything. I have users say they have received nothing either. It does send them emails to subscribe to the list just fine. When I try to send a test email out from the subscribe2 options, it only sends it to my webmaster account and not to any one else. I am using wphpmailer Do you have any suggestions what could this be? It really boggles my mind! Thanks for any help!! I really appreciate it!
I know this html email thing is addressed here...
http://www.skippy.net/blog/2005/12/29/subscribe2-22/
but I just had a quick question...
If I try this...
TITLE
in the new posts template will unregistered users see the desired effect, or will they see the html?
John,
I have been having the same problem for about 2 weeks. Everything worked up until that time. Now I get an email as the admin but no other accounts I manage get any email. If you figure out anything please post the solution.
BD
Skippy, I stopped just refreshing this page and read the latest entries of your blog. If anybody else is just checking this page looking for help, I think we should ease up on the support requests for the moment.
Thank you for all the work you have done to date. My thoughts are with you and your family at this difficult time.
Anthony
My thoughts and prayers are with you Skippy!
My thoughts and prayers are also with you Skippy.
Thanks for all the hardwork that you have done and the support for WP that you have given.
Excellent plug-in, thanks! Noticed that the newest version doesn't include a comment (e.g. ...your email address will not be shared...). Where would I need to insert text if I wish to have some little comments?
Never mind... just didn't think of the most obvious solution: Since I use the form on a separate page, I can simply add whatever I want to say after the tag.
Skippy, My prayers are also with you and your family during this time of great loss.
Has anyone installed subscribe on multiple blogs that share the same php database but have different table prefixes? and if so, does it work?
Thanks.
Hi Skippy,
I am in a host which only allows 50 emails a minute and 500 an hour. I don't have 500 subscribers (to my current system), but i have roughly 200.
Yes, i know, that is not nice from the host, but i am stuck with it for the next 2 years. Is there anything that can be done about this, so i can use Subscribe2 ?
Thanks a lot.
eduardo,
maybe you could set dreamhost to true and then it would batch 6 emails of 30 and 1 of 20.
Big Dog,
I thought of that, but what about the rate of sending? If i send 200 emails within a minute, i would be in breach.
Or would you think that would count as a total of 7 emails, (only with 200 recipients)?
I've installed the plugin and everything seems to work - but...
whenever An email is sent to someone on my ISP - it pass with no problem, But if it sent to msn, gmail etc... they dont get it
why?
great plugin! but do you have any intention of allowing the admin to decide whether normal users (not registered users) should be able to receive HTML messages?
i'd like people to be able to subscribe easily to the full-text html messages, without needing to be a registered user on my blog.
thanks! tom
[...] I also want to thank the following Wordpress plugin developers for helping to make my site so much better; Arnaud Froment for Extended Live Archives, Alexander Malov and Mike Lu for Related Posts, Scott Merrill for Subscribe 2 and the Backup and Wayne Keith Walrath for Adsense Deluxe. All of your plugins are excellent. Thank all of you for your time and effort! [...]
Love the plugin! Two things... In plain text email mode, the emails seem to add slashes, for example: Won\'t
Also... when someone clicks the link to confirm the subscription in their email, the blog loads the next page/previous page links. Is there any way to get this not to load?
TIA!
Skippy, I'm very interested in this plugin, but I still have some doubts:
1. I tried to open the .po and .mo files offered by you in poEdit and had problems (it showed nothing!). How do I translate it?
2. I tried to translate directly in the code (it worked, but) the confirmation screen messed up with my theme: it showed all my pages at once and renamed my pages links (in the sidebar) to "Confirmation subscription"!
3. The link provided in the confirmation e-mail had problems after the interrogation mark: the big sequence of numbers were not part of the link.
4. How do I change the e-mail subjects? And the other strings? Directly in the code? Can't it be in the options panel as before?
Thanks in advance,
JL
Skippy, I'd like to point out that the e-mail address I informed in my comment was wrong. The correct one the one I used in THIS post, ok?
I'd really like to use your plugin (since I already use backup and cron and they work flawlessly together), but I'm having problems setting it up...
Regards,
JL
Hi,
I posted a while ago regarding a problem I had with subscribe2 2.2 where the subscribe2 token was not being parsed in a page. I never managed to figure it out and ended up doing a fresh Wordpress from scratch. I then installed subscribe2 2.2.2 and this worked fine.
As I was adding other plugins, I noticed that the subscribe2 token had suddenly stopped being parsed again. After a little while I narrowed this down to one other plugin - myMooMus 1.4. If this is enabled, subscribe2 stops parsing. As soon as it's disabled, subscribe2 works again.
I haven't been using Wordpress long enough to make an instant guess why this would be, but I'm guessing one plugin is intercepting the content before the other and making it unreadable/unparsable to the other?
I'm about to let the author of MyMooMus know about this too but I thought you'd like to know of this issue.
Cheers
Richard
Thanks for a great plugin.
I have small weird issue, for some reason the email notification always lag behind, meaning that when I publish a post, the notification that is being sent is about the previous post I published. Any idea?
Skippy,
I may be asking very stupid questions but for minor updates, say from 2 2.2.0 to 2 2.2.2:
What files do I delete and or replace?
Will I be able to save my custom send messages?
Do I just deactivate, and upload/overwrite new files and reactivate?
Jay
[...] Subscribe2 - let your readers subscribe to your blog updates via email [...]
Also getting the pesky error of not sending emails to subscribers.
We are using WP_PHPMAILER to send on our Windows server. The admin gets copies of everything (subscribe, unsubscribes, and posts). Subscribers get the original email to subscribe and if needed the unsubscribe request.
However, when posting a new post or page, only the admin receives an email. No subscriber receives and there is no warning error in the MySQL log or PHP log. Our email system is setup for 200 max recepients, but its not even working for 2 subscribers. I don't think its a spam issue as the admin messages are not being marked as spam, nor are the subscribe confirmations.
Trying to figure out what could be the issue with sending batch mail via bcc on posts or on the direct send feature under WRITE > MAIL SUBSCRIBERS as neither work.
I've had the same problem with sending e-mails to subscribers on posts. I think it has to do with the way the BCC is setup in the e-mail header.
Search for this line:
('' == $bcc) ? $bcc = "Bcc: $recipient" : $bcc .= ",\r\n $recipient";You will notice that it contains a "\r\n" instead of just the "\n" every where else in the header. I tried changing it to "\n" but it still wasnt working for me. However, if I remove the "\r\n" completely it worked!
('' == $bcc) ? $bcc = "Bcc: $recipient" : $bcc .= ", $recipient";Anyone know if this is how BCC is supposed to be set in a mail header?
I'm still having the other problem of it inserting a backslash in from the the single quote too... anyone have an idea on how to fix that one?
Example:
I\'m sending a test post.Thanks Matt. I tried that and it did not seem to work, but I will try again and make sure the code is totally clean. Will let you and everyone know.
Yeah, no luck on the /r/n trick. I do see that there are some more /n in various other lines that related to BCC. I tried removing them as well, but still with no luck.
This is really odd, as the system seems to be working on everything except BCC'ing the list.
Make sure that you get BOTH of the lines in subscribe2.php that look like this:
('' == $bcc) ? $bcc = "Bcc: $recipient" : $bcc .= ",\r\n $recipient";There is one for how it builds the headers for Dreamhost and one for everyone else.
I'll keep looking at the code and at BCC in php mail headers to see if I can figure anything else out. Worst case I think I can modify the code to send an e-mail per subscriber instead of sending it through BCC.
Yeah, I did both so that they looked like this:
('' == $bcc) ? $bcc = "Bcc: $recipient" : $bcc .= ", $recipient";
That still had no effect. So I am taking a break after plugging away at this for awhile.
I ended up stripping down everything that was not needed for my host (i.e. I removed the Dreamhost code) just to test for CC:. Now it looks like this for the entire Cc code:
// Cc all recipients
$headers .= "Cc: ";
foreach ($recipients as $recipient) {
$recipient = trim($recipient);
$headers .= $recipient . ", ";
}
// actually send mail
@wp_mail($this->myemail, $subject, $mailtext, $headers);
}
// end mail()
The email to the admin is generated with the appropriate CC's. Of course, none of the CC's receive their message. So that is really, really odd. However, it is making progress.
I like your idea of creating a single email to each user. The only issue is that above 200 to 500 users your going to end up with some time-out issues.
OK, I compared the current version of Subscribe2 with an older version (2.1.7a), because that version worked fine for me. The thing that I noticed was that BCC was put in front of each recipient and they were each placed on their own line... not comma delimited.
So, try the following (which worked fine for me):
// Bcc all recipients foreach ($recipients as $recipient) { $recipient = trim($recipient); $headers .= "Bcc: $recipient\n"; } // Actually send mail @wp_mail($this->myemail, $subject, $mailtext, $headers);I was also able to fix the extra slash in the message by changing the following in the write_menu function. Not sure if this is the correct thing to do but it worked.
Old:
$message = $_POST['message'];New:
$message = stripslashes($_POST['message']);Anyone have any better suggestions on how to fix these issues? Are these two items confirmed as bugs to be fixed in a future release of Subscribe2?
[...] skippy dot net » subscribe2 2.2.2 Puts a simple “Subscribe” form into pages in WordPress so when that page is updated, the folks on the list receive an email. (tags: wordpress plugin) [...]
What does the Subscribe2 comment that I can add to a post while editing is adding?
oh, forget about my last question.
Thanks Matt. Unfortunately, the code still did not work. Really odd. We are trying other things today and will everyone know if we get it working on a Windows Environment with PHPMailer.
In my opinion, any mailer software that is not accepting the BCC format as used by subscribe2 2.2.2 is in violation of the RFCs. subscribe2 2.2.2 works on my server, running Postfix. I'd be interested to collect MTA info from others -- both success and failure -- so we can try to figure out what the common denominators are in these problem instances.
I just tested WP-PHPmailer using the following code. This sent out the mail and all BCCs. (Note I have commented out our secure info). So that narrowed down the possiblity of the class.phpmailer.php that is embeded in wp-phpmailer.php not functioning and not sending out BCC's.
Of course, I still need to go through the code of wp-phpmailer.php to see if it is passing over the correct BCC field from subscribe2 and of course the subscribe2 code.
I am wondering if the issue is that phpmailer requires code that says BCC should be added as $mail->AddBCc and CC should be added as $mail->AddCc (only on a Win32 system). Not sure if that is even on the right track. It could also be the header info being passed over is not being interpreted correctly by wp-phpmailer.php.
Anyways, I will keep plugging away.
From = "email@email.com";
$mail->FromName = "List manager";
$mail->Host = "mail.domain.com";
$mail->Mailer = "smtp";
$mail->SMTPAuth = true;
$mail->Username = "email@email.com";
$mail->Password = "password";
@MYSQL_CONNECT("localhost","user","password");
@mysql_select_db("database");
$query = "SELECT * FROM wp_subscribe2";
$result = @MYSQL_QUERY($query);
while ($row = mysql_fetch_array ($result))
{
// HTML body
$body = "Hello " . $row["email"] . ", ";
$body .= "Test message.";
$body .= "Sincerely, ";
// Plain text body (for mail clients that cannot read HTML)
$text_body = "Hello " . $row["email"] . ", \n\n";
$text_body .= "Your personal photograph to this message.\n\n";
$text_body .= "Sincerely, \n";
$text_body .= "phpmailer List manager";
$mail->Body = $body;
$mail->AltBody = $text_body;
$mail->AddAddress($row["email"], $row["email"]);
$mail->AddCc($row["email"], $row["email"]);
if(!$mail->Send())
echo "There has been a mail error sending to " . $row["email"] . "";
// Clear all addresses and attachments for next loop
$mail->ClearAddresses();
$mail->ClearAttachments();
}
?>
Skippy,
I just upgraded to Subscribe 2.2.2 today, and it is fantastic. Thanks again.
I don't know if you remember the problem I was having (back in January) with 2.2.0; even though the subscription code was in the body of a post, users were still getting 10 copies of the signup message.
However, that problem has been resolved in 2.2.2; now users are only getting the one message they are suppsed to get. So whatever you did under the hood worked.
Thanks again!!!! You're fantastic.
[...] This plugin is also brought to you by none other than the folk(s) at Skippy.net, and is implemented as the Subscribe2 plugin. [...]
OK, I think I got it working on our Win32 system. I commented out the following line in two areas:
// @wp_mail($this->myemail, $subject, $mailtext, $headers);
...and replaced it with a direct phpmailer code.
$mail = new phpmailer();
$mail->From = "email@domain.com";
$mail->FromName = "From Name";
$mail->Host = "mail.domain.com";
$mail->Mailer = "smtp";
$mail->SMTPAuth = true;
$mail->Username = "email@domain.com";
$mail->Password = "password";
$mail->Body = $mailtext;
$mail->Subject = $subject;
$mail->AddAddress($this->myemail);
$mail->AddCc("email@domain.com");
if(!$mail->Send()) echo "There has been a mail error.";
It sends the message to the admin, the cc: (which you can easily change to a bcc: by stating $mail->AddBcc. I will put in the loop to send to all the bcc's and it should work great. I guess the issue on our Windows system was that the subscribe2 and wp-phpmailer.php file were not speaking correctly. Not sure why, probably something to do with our Windows 2003 server config.
I will post the final loop code, once its done.
Hello Skippy.
Your script rocks. I got it working with our Windows 2003 server and WP PHPMAILER using the following code changes.
If anyone is having trouble with the BCC working with WP-PHPMAILER on a Windows system, then you may want to edit the subscribe2.php code and use the code below.
Basically, this will bypass the WP-PHPMAILER.php file and work directly with the class.phpmailer.php and class.smtp.php file.
I think the issue is that WP-PHPMAILER does not correctly interpret the AddBCC and AddCC which is needed to work on a Win32 system.
Anyways, here is the code. You can simply comment out the two @wp_mail lines that are in the mail creation area and then place this right below.
=====================================
// @wp_mail($this->myemail, $subject, $mailtext, $headers);
$mail = new phpmailer();
$mail->From = $this->myemail;
$mail->FromName = $this->myname;
$mail->Host = "mail.domain.com";
$mail->Mailer = "smtp";
$mail->SMTPAuth = true;
$mail->Username = "email@domain.com";
$mail->Password = "password";
$mail->Body = $mailtext;
$mail->Subject = $subject;
$mail->AddAddress($this->myemail);
foreach ($recipients as $recipient) {
$recipient = trim($recipient);
$mail->AddBcc($recipient);
}
if(!$mail->Send()) echo "There has been a mail error.";
===================================
Better programers can probably even make variables to pull in the host, username, and password from the WP-PHPMAILER database file. That way you do not have to modify the actual file and can do it from the WP Admin screens.
Skippy,
Really looking forward to getting Subscribe2 to work with my blog, but haven't been sucessful yet. I noticed that in the WP dashboard > Options > Subscribe2, near the bottom of the page under "Categories to Exclude" it says:
====================================================
Warning: Invalid argument supplied for foreach() in /www/c/myniceblog/htdocs/wordpress/wp-content/plugins/subscribe2.php on line 413
=====================================================
and, FWIW, the button beneath that says
=====================================================
submit"submit"
=====================================================
Thanks for any help!
[...] subscribe2: Lets visitors subscribe by email to updates happening on the site. [...]
Skippy,
I host my website with BlueHost and I'm not sure how to collect MTA info... but if you can tell me how to do it (and I have the ability to do it with my host), I'll be glad to help. Just send me an e-mail.
Hi Skippy,
after ugrading to WP 2.0.2 I upgraded subscribe2 from 2.1.6 to 2.2.2, too. If I try to activate the plugin I got following error messages:
Warning: main() [function.main]: open_basedir restriction in effect. File(/usr/lib/php/buttonsnap.php) is not within the allowed path(s): (/home/www/htdocs/one-brain-cellers.de/.) in /home/www/htdocs/one-brain-cellers.de/wordpress/wp-content/plugins/subscribe2/subscribe2.php on line 32
Warning: main(buttonsnap.php) [function.main]: failed to create stream: Operation not permitted in /home/www/htdocs/one-brain-cellers.de/wordpress/wp-content/plugins/subscribe2/subscribe2.php on line 32
Warning: main() [function.main]: Failed opening 'buttonsnap.php' for inclusion (include_path='.:/usr/lib/php') in /home/www/htdocs/one-brain-cellers.de/wordpress/wp-content/plugins/subscribe2/subscribe2.php on line 32
Fatal error: Call to undefined function: buttonsnap_textbutton() in /home/www/htdocs/one-brain-cellers.de/wordpress/wp-content/plugins/subscribe2/subscribe2.php on line 108
My provider has php 4.3.0 with activated safe mode. No chance for me to deactivate it (I arlready asked them).
Is there any workaround ?? Thanks in advance.
Skippy,
First of all, thanks for the great plugin. I really love it! I'm not sure if you intend to continue development, because I think you previously mentioned that you were not - although I really hope you do because this plugin is truly invaluable to the community at large!
I have installed the plugin at my site, and I have a few subscribers.
I would like to make a few suggestions for improvement:
1) In the admin control panel, under Manage Subscribers, if the default filter could be "All Subscribers" it would be a little more useful for me at least.
2) Is it possible to modify the Edit User screen (when managing users in the control panel) to show the individual user's subscriptions somewhere on the page? As Admin I need to go in and manage subscriptions for some of my less technically literate users. They managed to register, but didn't manage their own subscriptions and aren't getting notifications.
3) Would it be possible to have all subscription categories checked by default when a new user registers? They could then just de-select categories they wern't interested in.
If you don't wish to make the modifications but there might be a way I could accomplish some of this on my end I would sincerely appreciate some pointers. I do not know PHP, but I can hack it up a bit and follow instructions...
Thanks again for all the hard work. I'm the founder of HTMLHelp.com and I know what kind of strains that volunteerism can place on one's time.
Take care,
John P
Hi--I installed the plugin, but I am getting an error message that the database doesn't exist. Do I need to manually create it, or does the system do it for me? Thanks
Matt
John: I'll address your comments in order.
1) I'm not planning on making this "all subscribers" as a default action. Change line 908 to set a new default, if that's really important to you.
2) It should be possible to put this on the edit user screen; but it's not something I've checked to confirm. WordPress is funny: some things are immensely modifiable, and others are super hard-coded.
3) When new users register, I feel strongly that they should choose which categories they want. I'm a firm believer in opt-in mechanisms. See the function
register()starting at line 817 if you want to make changes.Matt: subscribe2 should make the database table for you automatically. Try de-activating, then re-activating the plugin to see if it works the second time around.
Hi Skippy. I am so sad to hear of your loss. It makes me feel particularly guilty bothering you now. If it’s too soon, I understand.
So... I just upgraded my blog from wp 1.5x to 2.02. I figured it was also time to upgrade my subscribe2. I was a happy 2.1.5 user. I had a link on my site and in my sidebar that pointed to subscribe.php. The instructions for the upgrade included getting rid of subscribe.php and creating a new page which contained the token. It also contained a note about being able to place the code in the sidebar but having to write out the code and not use the token.
I'm not much of a coder. In fact, one of the things I really appreciate about wp (generally) is not having to code much. For that reason it isn't obvious to me (even if it might be to the average user *GRIN*) what code I need to place in the sidebar.
I tried creating the page with the token in it to see the code there but even when using it when not logged in as a user and entering in an address not associated with a user account it instructs me to login. In the previous version my subscribers didn't need to be registered users of the blog.
I have Four questions:
First, what code do I need to put in the sidebar?
Second, is it no longer possible for unregistered users to subscribe?
Third, if it is no longer possible to subscribe without registering, what happens to folks who were subscribed under the old version but who do not have a user id? If they register now will their subscription automatically attach to their registration or will they need to resubscribe?
Finally, in the old version (if I'm remembering correctly... though it is entirely foreseeable that I am remembering it incorrectly *GRIN*) I think there was a feature that allowed the admin to turn off sending with one flip of a switch without turning off the plugin. Is it still possible to do that somewhere?
Thanks for all the help!
ArielZusya: 1) I'm not telling, as this is not something I support.
2) No one is required to register for your blog if they want text-only summaries of new posts. The general public can still elect to be notified. The format of those notifications is now different from previous versions.
3) All your subscribers should be preserved during an upgrade. Any non-registered subscriber who later registers on your blog will be automatically subscribed to every category in your blog.
4) There was no such feature. To prevent sending notifications, disable the plugin. Disabling the plugin will not muck with your subscriber list at all.
Skippy, any news about these doubts of mine?
1. I tried to translate directly in the code (it worked, but) the confirmation screen messed up with my theme: it showed all my pages at once and renamed my pages links (in the sidebar) to "Confirmation subscription"!
2. The link provided in the confirmation e-mail had problems after the interrogation mark: the big sequence of numbers were not part of the link.
3. How do I change the e-mail subjects? And the other strings? Directly in the code? Can't it be in the options panel as before?
Thanks in advance,
JL
Odd bug with Wordpress 2: The subscription confirmation page displays the message, but then it appears to concatenate the content of ALL the site's static pages at the bottom.
I'm looking through the source code to make a fix...
Ah hah - I was able to workaround this by manually specifying the S2PAGE variable.
Hey,
Great plugin. although I am having a small problem with the confirmed users. They are not getting emails? I dont plan on having any registered users anyway. So with no emails to the confirmed, I cant use it. Any ideas why the emails alerts are not going out the confired only
Skippy,
great plugin!
When I place the language files (.mo and .po) in the subscribe2-directory, it still remains english in the front and backend.
What am I doing wrong?
TIA,
Thomas
Hi, me again -
I found a bug at line 491
"$mailheaders = "Fr..."
must be
"$mailheaders .= "Fr..."
otherwise the previous header-information is overwritten (I just need the 'utf-8' in order to keep even the confirmation messages coming correctly...)
HTH,
Thomas
P. S.: Can you help me with the language thing, see above?
Sorry,
on the language issue: it has to go into the directory:
/wp-content/plugins
and not
/wp-content/plugins/subscribe2
Thanks!
Thomas
Hi! Does this plugin also work on WordPress 1.5.2? Somehow I do not see "subscribe2" under the options menu after activation. Cheers, Michiel
Thanks to Robert Stuart, I managed to avoid showing all pages when the reader confirms his/hers request. :)
But, it still changes the page links on the sidebar. How can I avoid it (I use fold_page_list)?
BTW, subscribe2 sometimes shows its error messages (e.g. "User not subscribed") on the same page of the form. Other, it shows in another page? Why is that? Still on the same topic, when it shows on another page, it DOES NOT alter all my page names on the sidebar. How can I mimic this when confirming a user's request?
Hi Skippy!
I'm translating subscribe2.pot file to spanish but I'm not sure where this file has to be placed in wordpress directory tree.
Could you help?
By the way, excellent plugin!!!
Thanks
Regards
Javier
Javier: check here for the Spanish translation. Plop those files in your /wp-content/plugins/ directory.
Skippy, I'm sorry to hear about your mom passing. That must be incredibly hard. You have had a lot of big changes recently including your dropping off of WP which I'm sad to hear as I like your plugins. Okay, on to my reason for being here...
1. With Subscribe2 2.2.2 under WordPress 2.0.2 I am finding that the remove does not work for my subscribers. They told me that so I tested it trying to do a remove for them and nothing seems to happen. When I check the Manage Subscribers I still find them listed as a subscriber.
2. Subscribe2's way of listing so many subscribers on a page when managing makes it run very slowly. I've only got about 500 right now and growing. Any way to improve this?
3. Itwould be nice if it were possible to use check boxes in stead of buttons to delete and to move subscribers between columns in the management and then press a button at the bottom to do the action.
Good job on Subscribe2 other than those details. Thanks for doing it!
Thanks for the plugin skippy!
I have one problem though. My wp installed into its own folder while the index file is in the root, so I have two different URLs in my options for the Wordpress Address and Blog Address. The confirmation URL is using Wordpress address URL which appears to be incorrect for me - if I change it to the Blog URL - it confirms the email, otherwise I get the Page Not Found message.
Could you please look into it?
Thanks a million!
Thanks for the plugin Skippy - its really a great funktion.
Have a little problem however. When the browser returns the confirmation page I get the following text after the confirmation message:
This is an example of a WordPress page, you could edit this to put information about yourself or your site so readers know where you are coming from. You can create as many pages like this one or sub-pages as you like and manage all of your content inside of WordPress.
How do I remove this?
Thank a lot for your help.
I have made an italian translation of this plugin.
Who is interested can contact me.
Skippy, if you want, I can send you the php tranlated.
lucacicca: send the files to me, and I'll place them with the other translation files.
Hi Skippy,
Nice plug-in although it doesn't seem to work on wordpress 2.02.
Installs ok but it doesn't send a subscribe email or unsubscribe email. When i check the manage->subscribers2 tab it does enter the email address.
So appears to be working except send email confirmation. I have not tried posting yet.
Any advice?
Jon: subscribe2 does work with WordPress 2.02; it just doesn't happen to work with your specific installation. There are a lot of possible causes. I encourage you to read the comments attached to this post, and the other subscribe2 posts on this site.
I am no longer providing support for my plugins. My plugins work for me, on my server. I have neither the time nor the patience to ask everyone to elaborate on their specific configurations every time they report "it doesn't work" without providing any additional details.
You may seek assistance at the WordPress support forums.
[...] Subscribe2 2.2.2 [...]
[...] Subscribe2 - let your readers subscribe to your blog updates via email [...]