1 yanndc Aug 23, 2006 14:22
3 yanndc Aug 24, 2006 07:05
ok thanks. I'll carefully take a look. I woulod really love to use this feature.
4 yanndc Aug 24, 2006 13:44
Hi,
Your tutorial helped me a lot. It fixed my problem about rfc complient.
The problem I now have is that the errors are not the same depending on the mail system used to send the message.
I tried from Notes, Outlook, Black berry, it all fails but all in a different manners:
From note:
Connecting to pop server...
Logging into pop server...
Getting message #1...
Processing...
1
Subject: writetoblogTest4 blog by email
Content-type: multipart/alternative, boundary: =_alternative 003F57EAC12571D4_=
Raw content:
Login: , Pass:
Wrong login or password.
OK. ,
It seems that html code screw up the whole process (Even the the doc says it is just removed).
I will work again to try to modify the setting of my mail programs to send only text.
5 yanndc Aug 24, 2006 13:47
When I change my Notes program to send only Text email I get:
Connecting to pop server...
Logging into pop server...
Getting message #1...
Processing...
1
Subject: writetoblogTest6
Content-type: text/plain, boundary:
Raw content:
eWFubmRjOjMyMWJsb2cNCg0KdGVzdCBibG9nIDYgDQoNCmVuZA0KIA0KIA0KWWFubiBkZSBDaGFt
cGxhaW4NCiBQcm9qZWN0IE1hbmFnZXINCiBJWElTIEFzc2V0IE1hbmFnZW1lbnQgIEdsb2JhbCBB
c3NvY2lhdGVzDQogIkEgY29tcGFueSBvZiBHcm91cGUgQ2Fpc3NlIGQnRXBhcmduZSINCg0KIElY
SVMgQVNTRVQgTUFOQUdFTUVOVA0KMjEgUXVhaSBk4oCZQXVzdGVybGl0eiwgIDc1MDEzIFBhcmlz
IA0KKEFkLiBQb3N0YWxlIDogNzU2MzQgUEFSSVMgY2VkZXggMTMpDQogVGVsLiA6ICszMyAoMCkx
IDc4IDQwIDk2IDIyDQogTW9iaWxlOiArMzMgKDApNiAyNyA2OCA5NSA0OQ0KIEZheCA6ICszMyAx
IDc4IDQwIDY4IDY3DQo=
Login: eWFubmRjOjMyMWJsb2cNCg0KdGVzdCBibG9nIDYgDQoNCmVuZA0KIA0KIA0KWWFubiBkZSBDaGFt, Pass:
Wrong login or password.
OK.
Not very nice result. Looks like binary data is sent.
6 stk Aug 24, 2006 18:13
yanndc,
Believe me when I say, "I feel your pain". For [url=http://pct-hike.randsco.com]6 months in 2002[/url], our only means of sending journal posts was via email.
I know how important it can be for people to establish a work-flow that allows them to blog via email. ;)
I have not had the chance (yet) to test the blog-by-email capabilities of v1.8. However, when I DID test the "alpha" version, it FAILED for two popular email clients (Yahoo!mail and Gmail). I posted this as a [url=http://forums.b2evolution.net/viewtopic.php?t=6833]bug report[/url] and was really hoping that it would be fixed for v1.8. :|
I never had the courtesy of a reply to that post and I'm afraid that it is entirely possible that the problems noted there, still remain. :(
I wish the developers would commit to posting only by email for 2 months and then I'd bet the blog-by-email code would be perfected :D ;)
It may be that you are doing nothing wrong and the getmail.php file (if it's still called that) is rife with bugs.
I'd recommend that you document your findings and post it in the bug report forum for 1.x bugs. (The more people that experience problems with blogging-by-email, the more likely developers will recognize that it's an important feature and devote more time to it).
[url=http://forums.b2evolution.net/viewtopic.php?t=7257]someone else[/url] has reported it as a problem too ... but I'd recommend you throw your 2 cents in.
Hope this helps.
7 yanndc Aug 24, 2006 18:20
ok.
Thank you very much for your help. At least I've progess in the right direction!
8 yanndc Aug 25, 2006 12:49
I am very proud to say that I was able to make it works!
Many modifications was required. There many different bugs.
The link you gave was very helpfull.
1. Regardless of the documention, your email program MUST send mail as TEXT ONLY.
2. In my case (Without Lotus Notes), even using text only, I had an html signature. That was overiding the TEXT ONLY setup and so it was failing.
3. In the setting you must remove the ping to blo.gs
4. For the word that end your article, don't put an easy word like "end", because if you write "I sent the article to whoever", you post will be "I s". Obvious, but I prefer to mention it, because I did it wrong. Now I use the same word as the one I put for the Subject.
5. Even if your message is TEXT only and you Signature is TEXT Only, DELETE your signature from the message. With my mail client it causes also another problem to getmail.php
6. In the help link at the beginning, I had to use the hack to insert return true; to remove the "Not RFC Complient blablabla".
7. I also used the hack for the unwanted line break (Just in case)
8. Note that I am using B2E V1.8.1RC2
I hope that will help some people.
9 blueyed Aug 27, 2006 18:26
yanndc wrote:
6. In the help link at the beginning, I had to use the hack to insert return true; to remove the "Not RFC Complient blablabla".
Which "help link"?
Please try to be as clear/verbose as possible, so a dev can pick it up and fix it for a future release.
10 yanndc Aug 28, 2006 07:14
the Help link that stk provided:
http://randsco.com/index.php/2005/04/06/posting_via_email#bm060823
11 _ext_sieg Aug 28, 2006 18:58
I cant seem to find the file that STK points to in his "how to" page where is the file _class_pop3.php
I have looked in all my dir and can't seem to locate this file, is this file still used in 1.8v ?
12 yanndc Aug 28, 2006 19:14
On 1.8, it is located in /blogs/inc/_misc/ext/_pop3.class.php
13 _ext_sieg Aug 28, 2006 23:02
I have the blog looking for the mail now atlest but now I get this error back,
Warning: strpos() [function.strpos]: Empty delimiter. in /hsphere/local/home2
I have no idea what this means can anyone hook me up :-/
14 blueyed Aug 29, 2006 00:02
What's the exact file and number? Also, it would help to copy'n'paste the code around this (+/- 5 lines) here.
15 _ext_sieg Aug 29, 2006 08:17
I would say its the getmail.php,, thats the file that is being checked by the cron job.
16 blueyed Aug 29, 2006 20:17
1. What's the exact/full error?
2. Then there's the file named to copy'n'paste (around the line that is mentioned there). Its path starts with "/hsphere/local/home2" .. and the line is also in this error message
17 _ext_sieg Aug 30, 2006 17:07
blueyed, below is the error I get next I pasted the code from the php file, it said it was line 245 as you can see. line 245 is this line :
-----------------------------------------------------------------------------------
$btpos = strpos( $content, $Settings->get('eblog_body_terminator') );
-----------------------------------------------------------------------------------
Subject: blog
Content-type: text/plain, boundary:
Raw content:
glenn@email.us:password why the **** aint this working
Warning: strpos() [function.strpos]: Empty delimiter. in /hsphere/local/home2/ext/sieg.us/cron/getmail.php on line 245
Login: glenn@email.com, Pass: password
Wrong login or password.
$content = strip_tags($content[1], '<img><p><br><i><b><u><em><strong><strike><font><span><div>');
}
$content = trim($content);
echo "<p><strong>Content-type:</strong> $content_type, <strong>boundary:</strong> $boundary</p>\n";
echo '<p><strong>', T_('Raw content:'), '</strong><br /><xmp>', $content, '</xmp></p>';
$btpos = strpos( $content, $Settings->get('eblog_body_terminator') );
if ($btpos) {
$content = substr($content, 0, $btpos);
}
$content = trim($content);
$blah = explode("\n", $content);
$firstline = $blah[0];
18 blueyed Aug 30, 2006 22:10
$ php -r 'echo strpos( "abc", "" );'
Warning: strpos(): Empty delimiter. in Command line code on line 1
That means: $Settings->get('eblog_body_terminator'), which it is by default. It's hidden with "Extra options".
You can ignore that warning (though a fix is here: http://evocms.cvs.sourceforge.net/evocms/b2evolution/blogs/cron/getmail.php?r1=1.5.2.2&r2=1.5.2.3&pathrev=v-1-8)
I guess, glenn@email.us is "just" not your (b2evo) login..?!
19 _ext_sieg Aug 31, 2006 19:12
blueyed,
Im still gettting the error codes, I changed the code as directed by your link, this is what Im getting when I try to post:
Parse error: syntax error, unexpected T_CASE in /hsphere/local/home2/extg/sst.us/cron/getmail.php on line 384
$pop3->quit();
timer_stop($output_debugging_info);
exit;
break;
case 'pop3a':
//--------------------------------------------------------------------
// eblog_method = POP3 through IMAP extension (experimental)
//--------------------------------------------------------------------
if( ! extension_loaded('imap') )
{
echo T_('The php_imap extension is not available to php on this server. Please configure a different email retrieval method on the Features tab.');
exit;
}
below is the code I changed as directed
echo "<p><strong>Content-type:</strong> $content_type, <strong>boundary:</strong> $boundary</p>\n";
echo '<p><strong>', T_('Raw content:'), '</strong><br /><xmp>', $content, '</xmp></p>';
$eblog_body_terminator = $Settings->get('eblog_body_terminator');
if( ! empty($eblog_body_terminator) )
{
$btpos = strpos( $content, $eblog_body_terminator );
if ($btpos) {
$content = substr($content, 0, $btpos);
:'( :'( :'( :'(
20 blueyed Aug 31, 2006 20:25
You probably missed a closing } there somewhere. Just download/replace the whole file, if you have not changed something else therein.
There's no reason to change your code - you can IGNORE the strpos-warning.
It's also NOT the reason for the "Login incorrect" error!
If you login to your blog/admin, what is your login? Probably NOT glenn@email.us..
21 _ext_sieg Aug 31, 2006 21:42
I dont understand, you say I need my log in for the blog, but in the back office it asks for the pop3 mail user name and password, am I missing something?
22 blueyed Aug 31, 2006 23:18
you need the pop3 login/password in the backoffice, but the user/b2evo login/password in the email. AFAIK.
I've never used this feature, only fixed something here and there about it.
23 yanndc Sep 01, 2006 07:28
You need it in the backoffice because it is not the same for your login in the blog.
For getmail.php, it is the credentials of your email account. Since the process needs to be run on a scheduled basis by the server, you need to provide the right information.
As you can read in the doc, you better not use your own email account. Because if a problem occurs, b2evo may delete the mails in your account.
24 _ext_sieg Sep 01, 2006 17:18
lol, how easy things go when you put the right pass word in the right place. I was putting the wrong username pass word into the email, lol so after I changed that bamm good to go, :) thank you all for all the help
25 yanndc Sep 01, 2006 20:18
[eXt wrote:
Sieg]lol, how easy things go when you put the right pass word in the right place. I was putting the wrong username pass word into the email, lol so after I changed that bamm good to go, :) thank you all for all the help
Ahhh... good.
26 sselden Sep 02, 2006 07:20
I'm getting the error:
Subject: blog: Test
Content-type: , boundary:
Raw content:
foobar:1234
Hello World
Login: , Pass:
Wrong login or password.
This is my login/pass for my blog user.
Any help would be appreciated.
27 yanndc Sep 02, 2006 10:07
I guess that is the same problem as for [eXt]Sieg.
You filled the email credentials with your B2Evo account instead of using an email account setting.
remember to use a different email account than your personnal one. Because when successfull, B2Evo delete the mails that he process.
So, the login must be your new email account login and password, your new email account password. It has nothing to do with the login/password of B2Evo.
This login info is used by the server to getmail.
I alsao suggest you read the documentation. You will also learn that you need to set your own scheduler to pull the getmail.php url.
Hope that help.
28 sselden Sep 02, 2006 10:17
Thanks for the reply.
Just to be clear...
I'm not having a problem connecting to the email account, rather getting the message posted to my blog.
in my email body are you saying I'm supposed to include my email account username and password? As opposed to my b2evo username/password? It seemed in all the docs I read that you're supposed to use your blog login. Otherwise how does the blog verify you're allowed to post to it at all?
29 sselden Sep 02, 2006 10:19
As a followup, even with my email username and password, I'm getting the same error. I think it's something to do with the content type/boundary maybe not being read in correctly.
30 yanndc Sep 02, 2006 10:27
Yes sorry you're right.
I need to go outside right now. If noone answered before, I'll look at it right after.
31 sselden Sep 02, 2006 10:32
Awesome thanks!!!!
I've tried Entourage and Apple Mail.
32 yanndc Sep 02, 2006 11:39
I'm back for couple minutes.
So foobar:1234 is you login password for your blog right?
Than, I am not yet an expert, but what I experienced on my side is that almsot every mail server display the content of the mail differently. Sometimes, they put a space before the first line of your email.
As you can read in the second mail of this thread, you can read the article :
1.http://randsco.com/index.php/2005/04/06/posting_via_email#bm060823
2.Make sure your DELETE your signature from the mail you send.
3. Make sure your mail software send mail as TEXT ONLY. No HTML at all.
4. BAck to point 1)... you may want to try the following. Because we see your login password in the raw content, I thin that maybe..., there is a blank line insetrted before you first line.
Unwanted Line Breaks (25-May-05) You may find that your email client textbox window adds hidden escape sequences to your emailed posts. You won't "see" these, because they are hidden, but you WILL notice undesirable line breaks in your emailed post. (See this entry for more detail). The fix is to add these two lines to your getmail.php file around line 248 (the lines in gray are for reference):
// CHECK and FORMAT content
$post_title = format_to_post ( trim($post_title), 0, 0 );
$content = format_to_post( trim($content), $Settings->get('AutoBR'), 0);
$content = ereg_replace("[\r\t\n]"," ",$content); // replace esc codes w/spaces.
$content = ereg_replace(' +',' ',trim($content)); // collapse white space
33 sselden Sep 02, 2006 22:17
Thanks for your help!! Sadly this didn't fix it. I will post back if I find a solution.
34 sselden Sep 03, 2006 00:03
My problem was caused by checking the Phone Email checkbox in the back office.
If this checkbox is checked then, at about line 257 of getmail.php, the if/else statement that sets the username and password fails when sending an email from an email client.
The workaround was either to uncheck the check box or to add a check for isset(eblog_phonemail).
Here's the code block that causes the problem:
[code]
if ( $Settings->get('eblog_phonemail'))
{
...
}
else
{
$userpassstring = $firstline;
$contentfirstline = '';
}
35 sselden Sep 03, 2006 00:03
This is with version 1.8.1
36 bobber205 Dec 04, 2006 20:58
What kind of provider were you using that acutally work posting via email?
Aargh. Gmail or my local on campus provider doesn't work... So frustrating this is! ;)
I may just have to scrap the whole notion of posting by email for now.
37 sselden Dec 05, 2006 04:20
I am using my corporate provider for email.
38 jeremiah Dec 16, 2006 14:46
Is it possible to post by email without having your username & password in the email ?
I know Wordpress allows it but I have had problems with Wordpress correctly reading the body of the email.
Thanks.
39 jeremiah Dec 16, 2006 23:54
OK, I have managed to answer my question by further forum searching.
But I have a new question : Has anyone written something that will allow b2 to receive an email formatted in html (rather than plain text) and to have it posted to the blog ?
Thanks.
You might want to look at "[url=http://randsco.com/index.php/2005/04/06/posting_via_email#bm060823]Considerations and More Detail[/url]" for the link provided.
It was originally written for v0.9x, so the file names and line numbers will likely be different, but it should help.
Hope so. Let me know.
Cheers,