• Hi,
    I’ve been trying to get the blog-by-email function to work, but I have been unable to do so. I keep getting a ‘wrong login or password’ error.
    As far as I can tell I’m doing everything as I should. The first line of my email is user:pass and I am using the correct username and password, yet I get the following from wp-mail.php:
    ——————-
    2
    Subject: Blog:Test
    Content-type: text/plain, boundary:
    Raw content:
    admin:******
    Testing post by email. Hello!
    Login: , Pass:
    Wrong login or password.
    ——————-
    Password censored for obvious reasons… Judging by the second last line of text in the output from wp-mail.php, it seems as though it’s not detecting my username and password in my email as being the username and password. I mean, it seems to display both login and password as being empty :/ So, anybody know what the problem is here?

Viewing 12 replies - 1 through 12 (of 12 total)
  • Thread Starter Jez

    (@jez)

    Unfortunately this forum seems to make it very hard to see where there are empty lines in that output. Here it is again, but I have placed /// to show empty lines.
    ——————-
    2
    ///
    Subject: Blog:Test
    ///
    Content-type: text/plain, boundary:
    ///
    Raw content:
    ///
    admin:fe4k3gr
    Testing post by email. Hello!
    ///
    Login: , Pass:
    ///
    Wrong login or password..
    ——————-
    So, are all the lines which are empty supposed to be empty? Especially that one inbetween ‘Raw content:’ and my login details.

    Thread Starter Jez

    (@jez)

    Your script looks like exactly the kind of thing I would want. However, it’s still giving me the ‘wrong login or password’ error 🙁
    Full output:
    ——————–
    2
    /// [empty lines]
    Subject: Blog:Test
    ///
    Raw content:
    ///
    admin:*******
    Testing post by email. Hello!
    ///
    Login: , Pass:
    ///
    Wrong login or password.
    ——————–

    Hmm, it works fine for me in the same format. Do you have some weird characters in the password or account? Try plain characters for one, second I always put use this structure:
    Subject: Blog: Test
    admin:******
    Text of blog entry.
    I don’t add an extra blank line before the login, but that shouldn’t matter due to the script looking for the first non-blank line. Also, I always put at least one return between password and the text entry.
    -Rob

    Thread Starter Jez

    (@jez)

    Hmm, interesting. It seems that one of my emails from the phone did actually work, but I hadn’t noticed due to some stupidity on my part (i.e. the date on the phone was 1 day in the past for some reason, heheh. So the post showed up before my most recent post).
    Take a look at it here. You’ll notice that the subject is completely screwed up. Any ideas why this is?
    And I still have to find out why this particular post worked and none of the others have done… Heh.

    Can you try sending an email with that phone to m@tidakada.com?
    Make it as if you’re posting to your blog, just provide a fake password. I will try to see what’s wrong in what the script gets.

    Thread Starter Jez

    (@jez)

    Okay, sent it.. Hopefully you can figure out what the matter is 🙂
    Thanks.

    OK, I think I have this figured and fixed.
    When I received the email, the subject line came as “=?ISO-8859-1?Q?blog:Test_Post_:::?=”, which is displayed as “blog:Test_Post_:::” by any email client. However, wp-mail.php doesn’t descramble it, and there the parsing goes wrong.
    So, here’s the fix, scroll down to the second bug on this wiki page:
    http://wiki.wordpress.org/index.php/1.0.1%20Bugs%20and%20Fixes

    hey jez. now i have a question to you. how did you end up getting this to work. because i still always get the ole:
    ——————-
    2
    Subject: Blog:Test
    Content-type: text/plain, boundary:
    Raw content:
    admin:******
    Testing post by email. Hello!
    Login: , Pass:
    Wrong login or password.
    ——————-
    i wonder if this could have something to do with the type of mailserver??? can anyone confirm this???
    the other thing is that my login is the email adress, thus contains an @, could that be the problem? and in my password i have a “-“

    Thread Starter Jez

    (@jez)

    Actually I still haven’t managed to get this to work properly :/
    I’m working on it…

    do you think it could have something to do with the mailserver???

    Greetings. I thought I’d post under this thread since I didn’t want to clutter the forum with same or similar question. I’m asking about blog by email settings. It seemed that it’s not working and I checked to make sure everything is set correctly. So far, it has failed due to “Wrong login or password.” Same error as Jez here. I’m logging in as an “admin”. I made sure I set up subject prefix and mail server as well as the password being correct. I typed in right password yet I still get an error over again and again. Am I missing anything here? How do I resolve this? Thanks.

    wp-mail.php pulls back the emails from the server just fine. The issue is that the $result always comes back empty. Tested the query on the server and it pulls back the appropriate record.
    Below is the output plus added the following to wp-mail.php to get some output.
    ****wp-mail.php code****
    if (!$result) {
    echo ‘
    <b>Wrong login or password.</b>
    </div>’;
    $post_author = $result->ID;
    $user_level = $result->user_level;
    echo “
    post_author = “,$post_author;
    echo “
    user_level = “,$user_level,”
    “;
    continue;
    ****Screen Output****
    1
    Subject: blog: test 3
    Content-type: text/plain, boundary:
    Raw content:
    chris:******
    This is a test
    Login: chris, Pass: ******
    SELECT ID, user_level FROM ci_users WHERE user_login=’chris’ AND user_pass=’****** ‘ ORDER BY ID DESC LIMIT 1
    Wrong login or password.
    post_author =
    user_level =
    0.057
    As you notice above php does not pull the result set properly since it is blank ‘post_author =’ should be ‘post_author = 3’ and ‘user_level =’ should be ‘user_level = 9’. Also I do realize that the code is in the !$result loop, however the same code outside of the loop yields the same results.
    Please do not say use IMAP… IMAP will not work for the scenario we are configuring.
    Thank you!

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘post-by-email – “wrong login or password”’ is closed to new replies.