WordPress.org

Ready to get started?Download WordPress

Forums

Subscribe2
[resolved] E-Mails not formatted, no images (45 posts)

  1. Lutz.H
    Member
    Posted 2 years ago #

    Hi MattyRob,

    sorry, it's me again ... ;)

    Changed my host account to an expensive one which can handle it's own cron jobs, de-activated WordPress cron job. Second problem could have been not supported SMTP mail handling, so installed a plugin called "Configure SMTP".

    This helpt with the mails when a comment has been written and manually mails can be sent, too. So the main problem seems to be fixed - thanks again for your help and patience!

    Nevertheless there are two problems left:

    1: There is still no automatically mail sent by Subscribe2. After half an hour after the set time I hit the button "Send Newsletter Again", then the mails were sent! So I guess we come back to a problem with your plugin ...
    Any idea what I could do?

    2: After I sent out the newsletter manually I saw it for the first time ... and am a litle disappointed. It's not formatted at all and containt no pictures. Even worse: it looks like that:

    Headline
    link

    text text text text text text text text text text text text text text text text text text text text text text text text text text text text text

    Headline
    link

    text text text text text text text text text text text text text text text text text text text text text text text text text text text text text

    and so on ...

    So the reader is not able to check out which parts belong together. Headline + link seem to be one unit, the text another one.

    To make it short: I really, reall do hope that there is a way to format that mails and put some pictures into it - or otherwise all our work, my time and my money would have been spent for nothing!

    Again: If you can fix all this, I'll donate with pleasure!

    Thanks again in advance and kind regards,
    Lutz

    http://wordpress.org/extend/plugins/subscribe2/

  2. mattyrob
    Member
    Plugin Contributor

    Posted 2 years ago #

    @Lutz.H,

    Why have you disabled WordPress cron? Subscribe2 needs that working to send notifications.

    If you have disabled it then you need to make sue the server cron table is making regular calls on the WordPress cron files so that the periodic tasks get run.

    Also, the free version of Subscribe2 sends plain text emails only. If you want to retains formatting and images (bearing in mind that Subscribe2 takes a excerpt of your post) then you would need to but the HTML version of Subscribe2.

    Before you do that make sure you can format emails using your theme CSS by sending preview emails in per post mode having added DIV tags as per your theme to the Subscribe2 templates.

  3. Lutz.H
    Member
    Posted 2 years ago #

    @MattyRob,

    in almost all support post is written that there is a bug concerning the wp cron job and that you have to replace it by an external ("real") cron job, e.g. here:
    http://buildyourblog.net/
    or here:
    http://wpdailybits.com/blog/replace-wordpress-cron-with-real-cron-job/74

    Shall I reset the wp cron job and cancel the cron job by my hoster?

    Formatting + images: I would buy the pro version if it helps ;))
    But I'm not quite sure if it does - because ...
    - I want to send a daily newsletter
    - the theme (Pagelines) doesn't concern with mails at all, but I could use a plugin if you can give me a hint which one will work that way you explained

    Maybe we can make a deal that I can try out Subscribe2 Pro for 30 days and if it doesn't work I can get a refund? How much would the Pro version cost?

    Kind regards,
    Lutz

  4. mattyrob
    Member
    Plugin Contributor

    Posted 2 years ago #

    @Lutz.H,

    There have been issues with WordPress cron over the years but those 2 articles are a minimum of a year old now. Cron has been subject to quite a few improvements in the last couple of WordPress releases.

    It still may fail on certain server configurations but I would certainly try it 'out of the box' before going along the route of applying a fix that might be unnecessary.

    The pro version of Subscribe2 can still send daily messages but to be clear Subscribe2 (free) only allows HTML to Registered Users (an incentive to register). The HTML (paid) version sends HTML emails to Public Subscribers by default rather than plain text BUT you still need to apply some HTML and CSS in the templates to do the styling.

    Subscribe2 is mainly designed to reflect your sites appearance in the email. If you just want fancy looking emails with minimal effort you may be better with JetPack.

  5. Lutz.H
    Member
    Posted 2 years ago #

    Hi Matthew,

    seems as if I don't have mich control of the way "Jetpack" is working and sending out mail newsletters. I guees your way is the more complex, but the secure and individual one. And if I can manage this (with your help) I would prefer the last option. Especially because we have gone such a long way together ;))

    Alrigh so, please let me know how to get the Pro vrsion and how where I cand find a guide how to configure the individual look (images and so on) ...

    Kind regards,
    Lutz

  6. mattyrob
    Member
    Plugin Contributor

    Posted 2 years ago #

    @Lutz,

    Sadly, there isn't a guide I can link you to, writing one is something I haven't found time for and it's a process that is very much theme specific. There is a specific forum for the paid version and I'll always help you out as much as I can on there.

    The HTML version is available here.

  7. Lutz.H
    Member
    Posted 2 years ago #

    MattyRob: I asked my hoster to send be a repot of every cron job running now. It did every hour and I tried 4 automated newsletters since then, but no one ws sent out. Again: When I set it manually by hitting that button the mails are sent. I tried with and without the wp-cron activated/deactivated in wp-config.php - didn't make a difference.
    So, before I start optimizing the mail styling (HTML version) we should fix that problem. As Jetpack is no option, I hope you'll help me with that!

    Kind regards
    Lutz

  8. Lutz.H
    Member
    Posted 2 years ago #

    @MattyRob: Hey, found a bug! The system sends out the newsletter on UTC time, not at site time. The problem: Thre lines below you write something like "Next mail send wen time is later than ..." followed by the PAGE time - so I thought that's the used time. Seems as if it's not ... ;))

    But unfortunately that doesn't solve my problem totally. Only one single mail has been sent out, and that went to the outgoing mail account itself (the one that I entered in the SMTP plugin as "sender mail address". All the other recipiants didn't get the mail.

    Sorry, Matt, but this looks like a bug in the Subscribe2 plugin, don't you think so? Or what else can I do to make that work?

    Maybe this will give you a hint - or is it another problem?
    In the sent newsletter mail there have been missing the two news mails from today; only the old news of yesterday have been included. Is it possible, that there hasn't been created a new "newsletter job"? And that's why there wasn't a new entry in the crop job cue or something like that?

    Kind regards,
    Lutz

  9. mattyrob
    Member
    Plugin Contributor

    Posted 2 years ago #

    @Lutz,

    Debugging WP cron is not something within my experience area. Does this article help though?

  10. Lutz.H
    Member
    Posted 2 years ago #

    Addendum: Ii it possible that Subscribe2 "reminds" which posts have been sent already? Or how does the tool decide which posts go into the newsletter mail and which don't? So maybe Subscribe2 got confused by all my testing and manual mail sendings and previews and "Send Again" actions? Just an idea ...

  11. Lutz.H
    Member
    Posted 2 years ago #

    @MattyRob,

    thanks, but this is exactly what I'm doing already. And as I just said: Because ONE mail has sent out automatically, I guess that this is no problem of the cron job anymore ...
    Hope you'll help!!!

    Kind regards,
    Lutz

  12. mattyrob
    Member
    Plugin Contributor

    Posted 2 years ago #

    @Lutz,

    Hmm, you may be on to something there. If you've been changing lots of settings it may be that things have gotten mixed up.

    Try installing the WP-Crontrol and have a look at the core scheduled events and see if they execute and move forward. There should also be a subscribe2_cron even in the list too.

  13. Lutz.H
    Member
    Posted 2 years ago #

    @MattyRob,

    I'm already using that tool and that has made up this idea. Here I find an entry "s2_digest_cron" for e.g. 18:00 hours and the header shows "GMT/UTC" - that's a difference of 2 hours on my location (site time).

  14. Lutz.H
    Member
    Posted 2 years ago #

    @MattyRob,

    and I've another bug report for you: If "Subscribe2 - Settings" says e.g. 6pm (it's really UTC!!!) for the next newsletter, I wait until 6:30 UTC and then set the new time for e.g. 7pm UTC (because it didn't work) then the cron job entry "s2_digest_cron" is set for the NEXT day! I guess because I use the setting "once a day". In some way it's correct, but I guess most users think like me: "Hey, it's 6:30pm UTC, when I set next send out time to 7pm UTC then it's going to send in half an hour." Right! But it doesn't, because Subscribe2 thinks, it already has sent out the newsletter for today.

    From my point of view that's misleading. And if I had the choice, I definetly would choose to decide by myself if it's okay to send the next newsletter in half an hour ("again") ... for whatever the reason might be.

    Maybe you can change that in th next version? I would appreciate that change ;))

    But for now I know that I can test the tool only once a day - or is there some trick how to change the date of the cron job ("s2_digest_cron"), too?

    I don't want to change the settings to "one mail for each post" because I would like to test if the new posts are gathered correctly ...

    Kind regards,
    Lutz

  15. mattyrob
    Member
    Plugin Contributor

    Posted 2 years ago #

    @Lutz,

    Is that time still in the future for you?

  16. Lutz.H
    Member
    Posted 2 years ago #

    @MattyRob,

    yes, all times I mentioned in my post above are in UTC, so I have had UTC 6:30pm and programmed the next ride for 7pm UTC.

  17. Lutz.H
    Member
    Posted 2 years ago #

    @MattyRob,

    alright, tricked the tool ;))

    Changed to "send every hour", then the date changes to today, too. After that I got an automatically sent mail! Ta-daa!

    Included have been some older posts from yesterday, but I'm not sure if that's because these posts never have been sent. Can you tell me how Subscribe2 which posts go into the newsletter?

    AND: The "subject" of the newsletter mail says "[mobilwatch.net] once an hour collected message" (translated from German, don't know the correct English description, sorry. Where can change that description? Didn't find anything like that in the "subscribe2-de_DE.po" file.

    Tomorrow I will set up HTML with your Pro version ...
    Hope, that'll work out much easier ;))

  18. mattyrob
    Member
    Plugin Contributor

    Posted 2 years ago #

    @Lutz,

    Subscribe2 creates database entries for the last successful sending and collects posts made since then. It also stores the previous successful so you can force a resend if something went wrong further down the emailing route (like an issue on the mail server).

    The subject for the Digest email is best change with a piece of code that acts as a filter. It's discussed in this recent thread.

  19. Lutz.H
    Member
    Posted 2 years ago #

    @MattyRob,

    thanks again!

    will check if it works in 45 minutes ;))

    I do not need any "<script>" or something around it?
    Just this plain code:

    add_filter('s2_email_subject', 'my_filter');
    function my_filter($subject) {
    if ( strstr($subject, "Digest Email") ) {
    $subject = "Ihr täglicher Newsletter";}
    return $subject;}

  20. mattyrob
    Member
    Plugin Contributor

    Posted 2 years ago #

    @Lutz,

    That's PHP code so it needs to be in a plugin file. It'll need a header with some of this:

    <?php
    /*
    Plugin Name: Name Of The Plugin
    Plugin URI: http://URI_Of_Page_Describing_Plugin_and_Updates
    Description: A brief description of the Plugin.
    Version: The Plugin's Version Number, e.g.: 1.0
    Author: Name Of The Plugin Author
    Author URI: http://URI_Of_The_Plugin_Author
    License: A "Slug" license name e.g. GPL2
    */
    ?>

    Enter the code above between the last */ and the ?>.

  21. Lutz.H
    Member
    Posted 2 years ago #

    @MattyRob,

    see: all that damn stuff I don't know ...
    Have to go to a HTML school ;))
    Thanks!!!!

  22. Lutz.H
    Member
    Posted 2 years ago #

    @MattyRob,

    I'm sorry, that didn't work...
    Copyied into my "custom code" section of my theme in the field "header code" the following:

    <?php
    add_filter('s2_email_subject', 'my_filter');
    function my_filter($subject) {
    if ( strstr($subject, "Digest Email") ) {
    $subject = "Ihr täglicher Newsletter";}
    return $subject;}
    ?>

    Isn't that correct? It seems to, because the mailing was sent out with it's default subject. Can you help again?

    But the good news is: mail works fine! Correct posts grabbed, every hour sharp, not problems with the mailing as it seems. Great! Thanks or that!!!!
    And that means that the cause of the problem was that irritation with time and date - I hope I could help you with that info in return ;))

    Kind Regards,
    Lutz

  23. Lutz.H
    Member
    Posted 2 years ago #

    @MattyRob,

    I'm sorry, that didn't work...
    Copyied into my "custom code" section of my theme in the field "header code" the following:

    <?php
    add_filter('s2_email_subject', 'my_filter');
    function my_filter($subject) {
    if ( strstr($subject, "Digest Email") ) {
    $subject = "Ihr täglicher Newsletter";}
    return $subject;}
    ?>

    Isn't that correct? It seems to, because the mailing was sent out with it's default subject. Can you help again?

    But the good news is: mail works fine! Correct posts grabbed, every hour sharp, not problems with the mailing as it seems. Great! Thanks or that!!!!
    And that means that the cause of the problem was that irritation with time and date - I hope I could help you with that info in return ;))

    Kind Regards,
    Lutz

  24. Lutz.H
    Member
    Posted 2 years ago #

    @MattyRob,

    okay, found the exact problem of that bug: I just switched back again from hourly newsletter to daily and with that changed the date of the next cron job to tomorrow! I get I didn't get that on my former tests because I only watched the time.
    By the way: This has nothing to do with the selected time an if this is before or after the local time (UTC or site time) - even if those are AFTER the actual time of the setting changes (and with that it would be time enough to send out the next newsletter today), Subscribe2 will plan the next cron job for tomorrow!
    Hope that helps finding the bug and correcting it ;))

    Nevertheless: There's still the problem with the custom subject line for the newsletter mails: the code I mentioned above isn't working, there must something be wrong with that, maybe with the way I embedded it in the header custom code section of my theme or the HTML style type or whatever ... Please do not forget to help me, fixing that ;))

    Again: Thanks in advance and kind regards,
    Lutz

  25. mattyrob
    Member
    Plugin Contributor

    Posted 2 years ago #

    @Lutz,

    Okay, the digest scheduling is supposed to work like that, when you set it it takes the time now plus the periodic interval you want to use, so for hourly it will send the first time an hour from now, daily will be tomorrow and weekly in a weeks time. It won't send now and then start counting.

    You second issue is because I think you put that code into your theme rather than making a new plugin. If you take the latter approach it should work.

  26. Lutz.H
    Member
    Posted 2 years ago #

    @MattyRob,

    alright, that makes sense, too ;))
    Maybe you can give a red hint in the next version so that every new user knows, how the tool is working.

    Code: OMG!
    Can I edit the subject in the HTML version of Subscribe2 - I would buy this one nevertheless? If not: How can I create a new plugin?

  27. mattyrob
    Member
    Plugin Contributor

    Posted 2 years ago #

    @Luzt,

    Take the code I gave you above and also the PHP header that was pasted into a post and put the 2 together in a file. Upload it to your plugins folder and then use the admin area to activate it.

    You'll have created your very own WordPress plugin!

  28. Lutz.H
    Member
    Posted 2 years ago #

    @MattyRob,

    holy sh*t! Almost crashed my WordPress dashbord!
    It's total design has been disrupted, error messages, panic!
    Nearly made it to delete my "nice" little plugin ...

    I did the following:

    code=

    <?php
    /*
    Plugin Name: Subscribe2_Custom_Subject
    Description: changes the subject of the newsletter mails
    Version: 1.0
    */
    ?>

    add_filter('s2_email_subject', 'my_filter');
    function my_filter($subject) {
    if ( strstr($subject, "Digest Email") ) {
    $subject = "Ihr täglicher Newsletter;}
    return $subject;}

    Put that with the editor into a file called "subscribe2_custom_subject.php", loaded it up to the ftp server, into the plugin folder, activated it.

    Then the wp dashboard layout was disrupted and disordered, so I deteled the folder from the ftp server. Then got these error messages:

    Warning: fopen(/is/htdocs/wp11032600_05RGMQV5HY/www/wp-content/plugins/custom-subject/Subscribe2_Custom_Subject.php) [function.fopen]: failed to open stream: No such file or directory in /is/htdocs/wp11032600_05RGMQV5HY/www/wp-includes/functions.php on line 3373

    Warning: fread(): supplied argument is not a valid stream resource in /is/htdocs/wp11032600_05RGMQV5HY/www/wp-includes/functions.php on line 3376

    Warning: fclose(): supplied argument is not a valid stream resource in /is/htdocs/wp11032600_05RGMQV5HY/www/wp-includes/functions.php on line 3379

    finished wp and logged in again - then no more messages were displayed.

    To make it short: I must have made a mistake somewhere.
    Can you help again, please?

    So much for creating my own plugin ... ;))

  29. mattyrob
    Member
    Plugin Contributor

    Posted 2 years ago #

    @Luzt,

    Your code is nearly there but not quite right. The "code" needs to come BEFORE the closing PHP tag - which is the ?>. Your finished plugin code should be this:

    <?php
    /*
    Plugin Name: Subscribe2_Custom_Subject
    Description: changes the subject of the newsletter mails
    Version: 1.0
    */
    
    add_filter('s2_email_subject', 'my_filter');
    function my_filter($subject) {
    if ( strstr($subject, "Digest Email") ) {
    $subject = "Ihr täglicher Newsletter";}
    return $subject;}
    ?>
  30. Lutz.H
    Member
    Posted 2 years ago #

    @MattyRob,

    thanks again! Don't know if it'll work (next run: tomorrow 4pm UTC), but at least I've got no error messages or nervous breakdown by the wp dashbord ;))

    Today I've got to do some other work but tomorrow after 4pm I'll start with the customization of the newsletetr mails with your HTML version - I really do hope that I can make that by myself! I'm really verry sorry for bothering you that much! But I hope that you might have got some ideas what to optimize in your next program versions ;))

    By the way: I'd suggest to put all those topics into the Pro version (I mean customization of the subject, including and positioning pictures and so on) and take some 49$ for the Pro app. I guess lot of people like me would be happy to pay that amount if they can customize the newsletter easily with it and not neading additional plugins!

    And you should position links to the Pro version more prominent: I didn't know that it exists unil you told me. Other authors have placed hints the a pay version of their program on almost every possible page of the installation and description process ;))

    Kind regards,
    Lutz

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.