This How-to assumes the following:
- You have already installed WordPress on your server, so if you have not, please do so before continuing.
- http://example.com/wordpress/ is the url of your WordPress installation.
- "admin" is the login you use to login as the administrator of the WordPress blog.
- You have access to a POP3 mailserver where you can setup new email accounts.
- We are dealing with WordPress v.1.2.Epsilon-RC1 and higher here. This might work for all versions of WordPress 1.2.x using the same wp-mail.php file as v1.2.Epsilon-
RC1 does.
Overview:
WordPress uses the "secret address" method to post by email. You have to create a new email address on your web host's mail server, and then change some settings in WordPress. You also have to regularly check the page wp-mail.php for new mails to post to the blog.
You need to create a sufficiently secretive email account to prevent the possibility of spam messages being posted on your blog. This is also addressed in this How-To.
Step 1:
- Log in to WordPress as the admin.
- Navigate to your blog's Writing Options page ( http://example.com/wp-admin/options-writing.php)
- Find the group of options that says "Writing by Email" and read the brief introduction there.
- You will find "Here are three random strings you could use:" and following this you will find three random strings. It would be good idea to use one of these strings as the username for the new email account that you have to create on your webhost's mail server. This will reduce the possibility of getting spam at the email address and the spam being posted to your weblog.
Step 2:
- Create a new email account on your webserver (using Cpanel, or whatever method your host provides you to create email accounts)-- you have the option of using one of the random strings that WordPress provided you as described in the previous step as the username. Let us assume that one of the random strings WordPress gave you was 'daea3' and you want to use this. The new email account created will be daea3@example.com. If you choose not to use one of the random strings, that is perfectly okay too. In any case, remember what string/username you used.
Step 3:
- At the http://www.example.com/wordpresswp-admin/options-writing.php page, enter the required details. If you are not sure, or don't know, refer to your web hosting service's user guide/faq or support
- Mailserver : Enter the mail server URI (eg. pop.example.com)
- Port : The default you will find, 110 is okay. 99.9% of the time, you won't have to change this. If you web-host explicitly mentions that the Port is different, then change this to whatever the web-host says is your mail port.
- Login Name : The login name that you would use to login and check the email for the account you created in Step 2. In our example it is daea3. What goes here may also depend on the mailserver. If daea3 does not work when you try to blog by email later, try daea3@example.com.
- Password: The password that you assigned the new email account when you created it. (eg, the password to check mail for daea3@example.com)
- Usual Category: The Category in your WordPress blog that you want all the articles you send by email to be published in.
Step 4:
- Create an email from your favourite email application, or some webmail system to the email address you created (eg daea3@example.com).
- The "subject" of the email will be the Title of the post in the weblog.
- The "content" of the email will be the content of the post in the weblog.
- Send the email.
Step 5:
- Access the wp-mail.php page(http://www.example.com/wordpress/wp-mail.php)
- An informative message will let you know if WordPress found any mail or not and whether the email was published on the weblog.
Step 6:
- To set up a system to access wp-mail.php to check for new emails that need to be published to the weblog, you can use cron, if your webhost allows you to set up cronjobs. This varies from server to server and host to host, so we will not discuss this in detail here. This guide to Setting up automated tasks using cron should be helpful. You can control the frequency with which wp-mail.php is accessed/checked.
- The actual command to be used in the cron job is
GET http://www.example.com/wp-mail.php (change the URL to that of your wp-mail.php)
This tutorial has been tried and tested using WordPress 1.2.Epsilon-RC1
