View previous topic :: View next topic |
Author |
Message |
Hakkai
Joined: 12 Sep 2002 Posts: 28
|
Posted: Fri Sep 13, 2002 12:09 am Post subject: posting using e-mail |
|
|
in the b2config.php, should the email settings be like this:
Code: |
# mailserver settings
$mailserver_url = 'mail.gau.grinster.net';
$mailserver_login = 'login';
$mailserver_pass = 'password';
$mailserver_port = 110;
|
the pop3 of my site is what I entered in the mailserver url. am I doing it right? what this settings mean?
Code: |
# subject prefix
$subjectprefix = 'blog:';
# body terminator string (starting from this string, everything will be ignored, including this string)
$bodyterminator = "##"; |
|
|
Back to top |
|
 |
Hakkai
Joined: 12 Sep 2002 Posts: 28
|
Posted: Fri Sep 13, 2002 12:56 am Post subject: |
|
|
btw, how does this thing work? where should I mail my blogs? please explain sorry for the stupidty |
|
Back to top |
|
 |
macshack
Joined: 17 Jul 2002 Posts: 1204 Location: Phoenix, Az
|
Posted: Fri Sep 13, 2002 2:55 am Post subject: |
|
|
Hi Hakkai,
Don't get mad, but first read the readme.html, then read it again.
Two key points:
Create a special account, meaning not your normal email account, to receive you 'blog' mail. That way your personal mail can't get messed up.
Quote: |
Preliminary advice:
It is strongly advised to send your email as text-only (Outlook and Outlook Express default to 'html', which may cause problems), but HTML email could work (the script would strip all your html tags though...).
It is also advised not to use your public email address, but create a new one especially for this script. If you use your public email address and the script goes crazy posting every email on your blog and deleting all your emails, I can't take responsibility for this.
Make sure you delete any email sent to your blog in your 'Sent' folder too, just in case (you don't want someone to find your login and password in the 'Sent' folder).
The script will delete the emails that were used to post stuff on your weblog if it successfully posted your stuff. If it didn't manage to post, the email is not deleted.
|
Then I would set the debug value to true in b2mail.php. Now assuming that you have a mail account for the blog mail, send a mail message to that account in the format described in the readme. This is very important, because if the format is wrong, b2mail with think is is YOUR mail and just skip it.
Now with the debug on, point your brower at the b2mail.php file. That will cause it to attempt to access your blog pop account and you should see some output telling you what it finds. If this works the first time, you are very good.
b2mail.php will then make an entry in the database.
Eventually you will want to set up some type of cyclic job (cron) to access the b2mail.php file to cause it to do its magic.
After all this, it works great. One note though, if your text mail client does some auto formating (line breaks) these will be converted to <br /> when it gets posted. Thus what you thought it was going to look like may not be what you get. Just a FYI.
Hope this helps. Just take your time and look at the output from b2mial.
If you need some further carification, let us know.
Kind regards,
Michael e |
|
Back to top |
|
 |
Hakkai
Joined: 12 Sep 2002 Posts: 28
|
Posted: Mon Sep 16, 2002 8:41 am Post subject: |
|
|
thanks. but how do I set a cron job to check the b2mail.php every 15 minutes. I already know how to set the time but not the command |
|
Back to top |
|
 |
macshack
Joined: 17 Jul 2002 Posts: 1204 Location: Phoenix, Az
|
|
Back to top |
|
 |
kichu
Joined: 23 Feb 2002 Posts: 53 Location: Chennai,India
|
Posted: Thu Sep 19, 2002 12:55 pm Post subject: |
|
|
I did all this.
But I get this error when I access b2mail.php:
Wrong login or password.
But I have put the correct login and password for b2 admin
in the format:
login:password
as the first line in the body of the mail.
Please help
S.K
<edit>
Which login+password set is to be entered?
Is it that of email, b2 or database?
Please tell me!
Thanks
</edit> _________________ Cause something to change, you are not here for ever! |
|
Back to top |
|
 |
macshack
Joined: 17 Jul 2002 Posts: 1204 Location: Phoenix, Az
|
Posted: Thu Sep 19, 2002 3:49 pm Post subject: |
|
|
Hi,
Quote: | Which login+password set is to be entered?
Is it that of email, b2 or database?
Please tell me!
Thanks |
This is b2's login for the user you want to use for posting from mail.
michael e |
|
Back to top |
|
 |
kichu
Joined: 23 Feb 2002 Posts: 53 Location: Chennai,India
|
Posted: Thu Sep 19, 2002 5:45 pm Post subject: |
|
|
Thanks, Macshack!
I am able to do the thing!
Also I found out thet you have to mail from the email id registered with the username!
Now, what is remaining.... yes!, the cron job!
Ready to soil my hands with it!!
Cheers!
S.K _________________ Cause something to change, you are not here for ever! |
|
Back to top |
|
 |
Hakkai
Joined: 12 Sep 2002 Posts: 28
|
Posted: Sat Sep 21, 2002 3:35 am Post subject: |
|
|
kichu wrote: | Thanks, Macshack!
I am able to do the thing!
Also I found out thet you have to mail from the email id registered with the username!
Now, what is remaining.... yes!, the cron job!
Ready to soil my hands with it!!
Cheers!
S.K |
still cant blog. I tried everything but when I point the browser to b2mail.php it says "login failed. what does that mean? |
|
Back to top |
|
 |
macshack
Joined: 17 Jul 2002 Posts: 1204 Location: Phoenix, Az
|
Posted: Sat Sep 21, 2002 5:18 am Post subject: |
|
|
Hi Hakkai,
Did you not say that you were successful before when accessing b2mail.php?
The 'logon failed' message is occurring because it thinks its getting an error during logon. This may not be true.
look at the code in b2mail.php around line 35 or so, you should find:
Code: |
if((!$Count) || ($Count == -1)) {
echo "<h1>Login Failed: $pop3->ERROR</h1>\n";
exit;
}
|
Add one line to that code and try it again.
Code: |
if((!$Count) || ($Count == -1)) {
echo "<h1>Login Failed: $pop3->ERROR</h1>\n";
$pop3->quit();
exit;
}
|
What this does is clean things up if it thinks that there was an error.
Then tell me what happens. You still have debug on in b2mail?
and do you have a url to access the site?
michael e |
|
Back to top |
|
 |
Hakkai
Joined: 12 Sep 2002 Posts: 28
|
Posted: Tue Sep 24, 2002 7:14 am Post subject: |
|
|
thanks man. The problem is fixed now. I think the problem is with the e-mail I use. I use http://box.ms and it's an html e-mail. B2mail reads the login name and then adds a , after it, so it would like like
password,:login. Maybe I should try it with other emails too
BTW, is it true that:
Quote: |
Also I found out thet you have to mail from the email id registered with the username! |
or I can e-mail with a different address than the one I entered in the b2 registration |
|
Back to top |
|
 |
Hakkai
Joined: 12 Sep 2002 Posts: 28
|
|
Back to top |
|
 |
Hakkai
Joined: 12 Sep 2002 Posts: 28
|
Posted: Sat Sep 28, 2002 12:47 am Post subject: |
|
|
did I do it right?
BTW the command I entered is:
Code: | wget -r /home/gau/public_html/b2mail.php > /dev/null |
Sometimes the posts dont appear  |
|
Back to top |
|
 |
Hakkai
Joined: 12 Sep 2002 Posts: 28
|
Posted: Sat Sep 28, 2002 1:14 am Post subject: |
|
|
this is wierd. I can't see the post in the index.php but I can see it in the b2edit.php.
Link
edit! now I know why, when I saw the post in b2edit.php the post of my e-mail says 14:00:00 while I posted it at 8 this morning. So that means that b2mail.php has added +6 on the time stamp because I configured the posts to have time stamps of +6 to be synchornized with my host. LOL! Is this a bug or something? |
|
Back to top |
|
 |
Arun
Joined: 01 Jan 2003 Posts: 1
|
Posted: Wed Jan 01, 2003 12:28 pm Post subject: |
|
|
I am getting the ollowing error when running the b2mail.php file.
"Ooops POP3: premature NOOP OK, NOT an RFC 1939 Compliant server"
Any solution for it ? |
|
Back to top |
|
 |
|