25 comments
Comment from: gillesklein
TRADUCTION DE CETTE PAGE EN FRANCAIS
b2evo User Manual
Manual :: How to… ::
Page: How to post by email English (EU)
Cette page se réfère à la version 0.8.6 de B2evouliton
Vous pouvez mettre à jour votre site par email !
En premier, éditer le fichier /conf/_advanced.php, et renseigner les informations concernant votre compte émail (attention cette interface ne supporte par les imap pour l’instant, utiliser uniquement POP3).
Une fois que vous aurez éditer ces option, il faut que votre server exécute /htsrv/getmail.php à intervalle régulier. (le temps de rafraîchissement dépend des performances de votre serveur, le script peut utiliser beaucoup de ressources, donc ne le faites pas tourner toutes les minutes !).
Vous pouvez le faire aussi avec un cron, où si votre hébergeur ne support pas cette fonction, vous pouvez vous intéresser aux services de monitoring de site, et faire en sorte qu’ils checkent l’url du fichier b2mail.php
Premier conseil.
Il est recommandé de rédiger ses émail au format texte seulement (faites attention car Outlook et Outlook express utilisent par défaut les fonction "html", ce qui peut poser des problèmes), mais les émails au format html fonctionnent tout de même. Généralement.
Il est aussi recommander de ne pas utiliser une adresse publique, mais d’en créer une spécialement pour ce script. Un script peut toujours bugger. Et pourrait effacer tout vos mail. Nous ne pouvons prendre de responsabilité à ce sujet.
Assurez vous d’effacer tout les émails envoyé à votre blog contenu dans le dossier "envoyé" (sent) juste au cas où (pour éviter que quelqu’un ne trouve votre login et mot de passe dans ce dossier).
Le script effacera les émail que sont utilisés pour poster une info dans votre blog dès que votre émail sera publié. Si la publication a échoué l’émail ne sera pas effacé.
Comment poster un émail sur votre site.
L’émail devra être rédigé ainsi :
To: addresse@domain.com (vous aurez configuré cette adresse dans le fichier de configuration)
Subject: blog:Le titre de l’article (vous pouvez changer le mot clef ‘blog:’ dans le fichier de configuration)
Body:
login:password (exemple: Jack:Starwars)
Et votre texte, blah blah blah.
More blah blah.
L’objet doit commencer avec l’expression [blog:], ou n’importe quoi quel autre mot que vous aurez configurer dans e fichier de configuration (comme cela le script ne checkera pas tout vos mails).
Boby (corps du texte). La première ligne DOIT contenir le login et le mot de passe sous cette forme login:password, sinon le script ne prendra pas en compte le mail.
Terminer votre émail de 3 tirets bas ___
afin de prévenir le script de la fin de votre texte et d’éviter ainsi de publier les publicités qui accompagnent souvent les mails (yahoo, hotmail…).
Le cas spécial des mails envoyé par téléphones portables !
Certaines sociétés de téléphones portable permettent d’envoyer des mails. Mais sur ces services, vous ne pouvez pas toujours contrôler le renvoi à la ligne. Dans ce cas, paramètrez ainsi la ligne $use_phoneemail = 1 du fichier /conf/_advanced.php. Dans ce cas, utilisez la syntaxe suivant pour envoyer vos mail ;
To: adresse@domain.com
Subject: blog:le titre de votre article :::
Body:
login:password ::: Le contenu de votre mail blah blah blah.___
Attention aux ‘:::’ (or ou tout autre signe porte dans le fichier de configuration) arès le sujet et le login:password.
Certains fournisseurs de téléphones portables ne permettent pas d’utiliser la case ‘objet’. Ce sont les premiers caractères des mails qui sont utilisés pour l’objet. Dans ce cas rédiger votre mail ainsi :
To: adresse@domain.com
Body:
blog:le titre de l’article ::: login:password ::: le contenu du message, blah blah blah.___
Comment from: Dave Eagle
The default blog is set in the conf/_advanced.php file ($default_to_blog = 2; for example).
Comment from: Dave Eagle
The default blog is set in the conf/_advanced.php file ($default_to_blog = 2; for example).
Comment from: Ruda
Hi!
With Mozilla, everithing is OK, but with IE 6.0, I don’t post. Why???
Comment from: Charles
To change the blog under which your emailed post will aggregate, you have to specify one of the categories for the blog in the body of the email. (I figured this out by diving into the b2evo core code…) Like so:
16
Use the ID # of the category - you can figure this out by clicking the "Categories" tab in the admin, then click the blog you want to post to. Mouse over one of the categories and look in the status bar of your browser - you should see some code that looks like:
http://blogs.mysite.com/admin/b2categories.php?action=Edit&cat_ID=16
The category ID is the "cat_ID" in the query string.
There may be (and probably *should*) be an easier way to do this.
Comment from: Charles
Looks like my category syntax got deleted. This is what you should put in the body of the email:
\16\
Comment from: Charles
oops, one more time:
‹category›16‹/category›
For anyone interested, I wrote up a detailed description about ‘email by blogging’, as a supplement guide.
-Scott
Yeah!Thanks!
Comment from: Pat
Does anyone how to post an email to a blog and disable the comment option?
Is there a line of code to enter into the body of the email that will do this?
I want to use a blog to receive emails but not give the option for readers to comment.
Thanks for any insights . . .
I tried to run getmail.php from command line (and cron) using "php /path/to/htsrv/getmail.php" and noticed the following:
Warning: strpos(): Empty delimiter. in /var/www/http/www.domain.tld/blog/htsrv/getmail.php on line 248
The post makes it into the blog but the mail does not get deleted. Maybe because of this error notice or maybe because of another bug.
The next time getmail.php runs it does the same work on the old mail again and it appears again in the blog.
Maybe somebody can help me out with that… :-)
Comment from: Kelton Joyner
I am trying to get posting by email to work. The first problem was my hosting web server wasn’t RFC1939 I found the fix for QMail & non-RFC1939 Compliant Mail Servers in modified the _class.pop2.php file. It now starts processing the email but after the raw processing gives the following error:
Login: username, Pass: password
(changed from real user ID password)
Wrong login or password.
OK.
How to I fix this problem
Comment from: Dave
I keep getting the following error at the end of my getmail php script.
Login:
, Pass:
Wrong login or password.
OK.
I can’t figure out where I am missing the login name and password.
It is both in my email body as the first line "loginname:password" and it is in the advanced.php file.
Any suggestions?
Dave
Comment from: GT-Schorsch
Hello!
I’m using the post by email feature, too. I know you can change category by writing something like "15" (without qoutes and 15 being the category id), but I also need to change the message status from published to protected. I tried "protected", but getmail.php said "Illegal tag: status". So is it possible to change the message status by posting through posting by email? I hope you know what I mean…
Thanks for answering,
GT-Schorsch
Comment from: GT-Schorsch
Hi again,
the category-tags and the wrong status-tags I used in the above message are not properly shown. I just wanted to say that for better understanding.
Bye,
GT-Schorsch
Comment from: Asked to login when run getmail.php from unix command line
Hi,
I tried to schedule getmail.php in cron, but when I run it from command line, it prints out the html that looks like the login page, and exit, no getmail logic seems to be executed. How to set it up then?
I am using 1.6alpha
Jun
in order to change the status of the message to read anything but "published" you need to edit the line in the getmail.php file after..
// INSERT NEW POST INTO DB:
and change "published" to whatever you want. I suppose you could create a variable to designate this in the content of the e-mail also.
As for me, I just want to send a draft to the blog in order to post it later.
I love B2Evolution. Thanks for the great software, but I’m getting frustrated with the e-mail version. How do I set up a cron
Comment from: sharon
I’m having the same problem others reported about wrong login, password. It seems this is a common issue. If someone has solved this can you post a reply?
Comment from: wrong login, password.
I had the wrong login, password.problem when I used outlook to send mails. When I switched to plain text format it worked.
Now the postings are visible in backoffice. But I cannot get them to the blog. Any help will be highly appreciated.
/Ish
How to fix the timestamp problem? Posts are off by 4 hours. The time displays correctly everywhere except of b2evo.
the login and password errors are coming from not sending a login or password wiht the e-mail. Don’t send the login or password for the pop3 account, but the login and password for the blog user.
This is sent in the first line of the e-mail with the format…
login:password
the colon between each is necessary.
I am getting the following error msg when trying to use
the email function…
Requested Blog from T_blogs without ID!
Any suggestions?
Thank you!
I just wanted to leave a positive comment. I know this is the right place to ask questions about errors and problems. It seems to pile up though and I wanted to let you know that I am very pleased with b2evolution as a whole and am enjoying the blog by email feature too. It takes some patience to learn what settings to use, but what doesn’t when you learn a new skill? Thank you for all your hard work.
How do I get it to change the blog it’s posting to? Currently it’s trying to post to blog 2.
I’ve changed (in _advanced.php) the default_to_blog setting to point to blog 5, but it doesn’t seem to change anything.
Thanks,
Mark