• My blog by email posts are blank. WP is able to access the email account I have set up for blog by email purposes, along with the messages I send. The subject line becomes the title of the post; however the text within my email is redacted.

    It appears that this happens during the sequence in which WP gets the contents of my email to post. Here is a copy of the confirmation email I receive from WP.

    *********

    Author = *********@yahoo.com
    Content-type: multipart/alternative, boundary: 0-79868778-1200130438=:79225
    Raw content:

    Author: 3
    Posted title: test
    Posted content:

    Mission complete, message 1 deleted.

    ********

    As you can see, it says that there is no content to post.

    Here are all the things I think might help in diagnosing this problem:
    – I send email from my Yahoo! account (HTML) email account.
    – I tested the bug and it only happens with HTML formatted email from Outlook, Yahoo!, or GMail accounts. Email sent as text only don’t appear to have a problem.
    – I use WP 2.3.2. I had a similar problem with 2.1 and 2.2 and fixed it according to the fix on Bug 4337 – https://trac.www.ads-software.com/ticket/4337. It reappeared when I installed 2.3.1. The same fix does not correct my problems now.

    Any ideas on how I can fix this? Are there any debugging logs I should turn on to further help diagnose the source of my problem?

Viewing 12 replies - 16 through 27 (of 27 total)
  • This could soon fixed – well from an iPhone!

    https://www.macworld.co.uk/ipod-itunes/news/index.cfm?RSS&NewsID=20974

    Re: published/pending

    From reading the php, blog by email posts seem to be marked as pending on less the email address has an account in that WordPress blog. This can be changed by editing wp-mail.php and changing ‘pending’ to ‘publish’ in the line under

    // Author not found in DB, set status to pending. Author already set to admin.

    Thanx bbrian, that fix did it!

    Now, how do we fix those annoying line breaks coming from the e-mail format?…

    Here’s how I fixed the line breaks:

    I used the Text Control plugin:
    https://dev.wp-plugins.org/wiki/TextControl
    Install the plugin package into WordPress.

    You will now find text control config in your WordPress SETTINGS

    Within text control config, change the default post setting to MARKDOWN

    If you have PHP v. 5x, you will need to replace the markdown.php file with an updated version. Otherwise, you will get errors on every post about Warning: preg_replace_callback()

    Here is the updated version of markdown.php:
    https://michelf.com/projects/php-markdown/

    I’m having the problem of being stuck in pending preview too. I don’t have anything like this in my wp-mail.php file. Don’t have a clue as to where it would go.

    // Author not found in DB, set status to pending. Author already set to admin.

    Gungho lady – this should be there. I found it in my 2.5 install. I used my ftp program (I used FileZilla on PC – it’s very easy to use), downloaded the wp-mail.php file to my desktop, opened it in Notepad (should be on your machine – use textedit or something on a Mac), did a search for, IIRC “not found” and got the line. (I tried searching for that whole line and couldn’t find it – try again!)

    Changed pending to publish and voila!

    Err, actually it didn’t help my problem, but it might help yours… I needed to put the right update string to wake up Postie into my footer.

    So how you getting on with this?

    Nope, I updated my WordPress with the latest download. Everything wp-* was deleted as per the instructions and the new files uploaded using filezilla. That string was not in my wp-mail.php file.

    What I ended up having to do to solve the problem was to create a new user with Author privileges whose email address was the same as the special email address created for WordPress.

    Thread Starter geodanny

    (@geodanny)

    Still happening. Posts sent by email are blank except for the subject line which becomes the title. I have WP 2.5.1.

    Author = *********@yahoo.com
    Content-type: multipart/alternative, boundary: 0-377353644-1209781424=:7075
    Raw content:

    Author: 3
    Posted title: testing posting
    Posted content:

    Mission complete, message 1 deleted.

    Thread Starter geodanny

    (@geodanny)

    I opened a bug track ticket for this issue: https://trac.www.ads-software.com/ticket/6904

    Thread Starter geodanny

    (@geodanny)

    Although the bug I opened was closed (I won’t reopen) this remains an issue with WP 2.6.1.

    The issue is that WP strips out HTML from email when posting by email. In the process, it strips out the content from of email sent in HTML format (default setting with Y! Mail, GMail, Outlook, etc.). Ultimately, WP needs to accept email in HTML format. In the meantime, it appears this will not be fixed.

    For those interested, you may edit wp-mail.php yourself and make the quick fix I made (note: I’m not a coder).

    My fix: remove this section of code

    if ($content_type == 'multipart/alternative') {
    		$content = explode('--'.$boundary, $content);
    		$content = $content[2];
    		$content = explode('Content-Transfer-Encoding: quoted-printable', $content);
    		$content = strip_tags($content[1], '<img><p><br /><i><b><u><em><strong><strike><font><span><div>');
    	}

    Removing that code leaves me with a post that contains unnecessary info about the content type, encoding, etc. I can edit at a later time to remove the unnecessary info. I can tolerate this compromise because the alternative (leaving the code in tact) strips the content of my email and leaves me with an empty post.

    Hello everyone,

    I’m not a coder, but I think I’ve found the problem. If you look at line 152, you see:

    $content = explode('Content-Transfer-Encoding: quoted-printable', $content);

    This line is basically setting the boundaries for the “meat” of the email. Depending upon what service the email is originating from, “quoted-printable” may be within the source of the email. After looking at email sources from various providers, I decided to change it to “Content-Transfer-Encoding:” This leaves a bit of junk in the message, but at least it lets it get through. If you comment out lines 149-155 you get a similar effect, but a whole lot more junk.

    I wish I knew more about PHP to put in various cases of Content-Transfer-Encoding, to eliminate the rest of the junk, so if anyone can help me out here that would be great.

    Tim
    TMedWeb

Viewing 12 replies - 16 through 27 (of 27 total)
  • The topic ‘Blog by email posts blank in 2.3.2 w/ HTML email’ is closed to new replies.