How to get full text delivery in subscribe to Email

I purchased the service because of the Subscribe to Email plugin. I thought it would send the full text or HTML versions of the post to subscribers. It does not seem to do this/ How would I in fact get the HTML version to be the delivery from this or another plugin.

We tried subscribe2. However, we found the support and options were not what we wanted. So, we signed up for your service. We figured that as a paid option the Subscribe to Email would be more robust. However, we do seem to want more than we see in the current options of this plug in. Also, how can we edit items such as the subject line and sender email name and address?

  • Mason

    Hiya repequity,

    First off, many thanks for joining up at WPMU DEV!

    I'm going to move this thread over to our 'Feature Suggestions & Feedback' forum.

    By default, WordPress views an 'excerpt' as a bit of content with no styling or html output. This is consistent across the platform. Adding an option to output the entire contents of the post would be cool though and I'd be interested in seeing if other members here were looking for something like this.

    The plugin doesn't track a username (the widget only provides for email address entry) and the subject line is coded in the plugin on line 329. You could edit it there. The 'content' of the email is defined in lines 33-44. If you make any edits here make sure you save a copy so you know what to change when further updates are released.

    So, other members, what do you think? Is full html output of posts something you'd like to see?

    Any +1s?

    thanks!

  • Timothy Bowers

    So, we signed up for your service. We figured that as a paid option the Subscribe to Email would be more robust. However, we do seem to want more than we see in the current options of this plug in.

    In all fairness the product page fully describes the product and furthermore gives screenshots of the admin area. They also have a sales contact form should have had questions about the product.

    Anyway... That doesn't help you now, so lets start, in file:

    /wp-content/plugins/subscribe-by-email/subscribe-by-email.php

    Around line 298 you will see:

    //get excerpt
    	if ($post->post_excerpt && !empty($post->post_excerpt)) {
    		$post_excerpt = $post->post_excerpt;
    	} else {
    		$post_excerpt = $post_content;
    		if (strlen($post_excerpt) > 255) {
    			$post_excerpt = substr($post_excerpt,0,252) . '...';
    		}
    	}

    This code is grabbing the excerpt.

    Now, I haven't tested this and so you will need to in order to be sure it works.

    $post_excerpt = $post_content;
    		if (strlen($post_excerpt) > 255) {
    			$post_excerpt = substr($post_excerpt,0,252) . '...';
    		}

    The function strlen() is for the string length (count) and if its longer than 255 characters then it goes onto the next conditional statement. The function substr() take three arguments the last two being numbers which are character counts, the first number is the starting position the second is ending position. The first argument is obviously the except (full post in this case). It might be wise to keep these but adjust them to what you think is reasonable. I say this because if you make a huge post and had a reasonable subscriber list it could be a strain.

    But if you didn't want any shortening at all then you could just make the variables equal or as a reference. So replace the original with just:

    $post_excerpt = $post_content;

    For e-mail address it takes the sites admin e-mail address and so you could change it there for simplicity but if you really wanted it to be different then on line 330:

    $from_email = $admin_email;

    Could be something like:

    $from_email = 'your-email@domain.com';

    Does the plugin support html? Not tested it really.

  • Timothy Bowers

    Hey Mason.

    +1 for me.

    I'd like to see some more development here for html e-mails, perhaps even some support for matching e-mails to existing accounts.

    Whilst we're doing the feature request thing then I'd also like to see some archiving done of past mail stats (how many received the mail) and perhaps integration with a few other services or extending your other plugin for e-mail with Mail Chimp. I'm sure there are also some other options out there with API integration?

  • danhavey

    I got it to email the full content by doing the following:

    if ($post->post_content && !empty($post->post_content)) {
    $post_content = $post->post_content;
    } else {
    $post_content = $post_content;

    //if (strlen($post_excerpt) > 255) {
    // $post_excerpt = substr($post_excerpt,0,252) . '...';
    //}

    HOWEVER, no matter what I do I can't change the $from_email. I did as suggested above (and about 20 other things, including removing $message_headers from wp_mail and no matter what it shows the 'from email' in the email sent as [noreply@domainname.com]. This is of course not what I have the admin email set as.

    Any thoughts where it may be pulling this from?

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.