Submitting blog posts by email (1.x)

Note: this is only applicable to Mailhandler versions 6.x-1.x and 7.x-1.x (colloquially "Mailhandler 1.x"). For a tutorial on setting up a more complex post-by-email system and mailing list (which could integrate with a forum or case tracker), using Mailhandler 2.x, see the article Setting up an email-driven workflow with attachments

How to submit Blog post by Email Note, my experiences are for simple email processing. I haven't done anything like tying an email list to a forum.

Step 1: Turn on the mailhandler module

Admin -> Modules
Click on the module

Step 2: Set up an email account to which you will send email

This depends on what you are using for a mail hosting service. I use cpanel, click on Mail , click on Manage/Add/Remove accounts.. Click on Add accounts and set up the email address and the password. For my system, the email can be retrieved as POP3. Again, this depends on the mail hosting service you are using.

Step 3: Configure the mailhandler

Admin -> Mailhandler
Click on Add Mailbox, fill in the appropriate fields.

Email address
Use the email address you set up in step 2 e.g. incoming@example.com. (I have not used the Second email address for my purposes.) In most cases, using INBOX and POP3 for the folder and Mailbox settings should work, again, it depends on your mail service.

Mailbox domain
Should be the domain that you are using. e.g. example.com

Mailbox port
Again, the default of 110 should work, depending on your hosting service.

Mailbox username and password:
Use the userid and password from Step 2, or whatever has been assigned for the email address.

Extra commands
Extra parameters to send with imap_open() for certain mail servers that require certain parameters. For example, warning: imap_open() [function.imap-open]: Couldn't open stream -- this warning requires Extra commands to have: /novalidate-cert/tls

Mime preference
I always simply use HTML. Your choice. Not a biggie.

Security
I leave this disabled. I believe there is enough security with the mail handler as it is. If you do enable it be sure not to use the HTML mime preference.

Send error replies
I like to enable this and leave it enabled, unless I am tying somehow to a mailing list. Even if I am doing that, I would initially have send error replies on until I am sure things are doing what I want.

From header
Again, for personal mail handling, I leave this blank. As noted, you may want to use Sender for mailing lists.

Default commands
This is where I end up doing most of my tweaking. Currently, as an example, I use
type: page
taxonomy: [mail]
promote: 1
format: 3

type: page causes the posts to be page entries. You can also use blog, story, forum, etc.

taxonomy: [mail] I have a taxonomy term called mail for all posts coming in via email. This can be omitted if you don't want to place the entries into a taxonomy category

promote: 1 For the site I'm using, I want email entries to be promoted to the front page. If you don't want them promoted to the front page, omit this line

format: 3 This is my latest tweak to get it so the posts are processed as Full HTML instead of filtered HTML. If you are going to receive HTML email, you really should have this on.

Signature Separator: I leave this blank. This is probably most useful for mail coming from a mailing list that appends some signature stuff, or if you have your own signature file.

Delete Messages after they are processed: Yup. I do that. I don't want the mail box filling up with messages that have already been processed.

cron processing: I generally leave this on.

Step 4: Testing Mail Sending

Once you have the account set up, send an email to the account. Be sure to send it from an email address that has a userid on your site. Otherwise you will get a message something like:

The e-mail address 'tester@example.com' may not create page items.
You sent:
From: tester@example.com

Step 5: Testing the mail retrieval

When the mail has been sent, go to:
Admin -> Mailhandler

You should see the email address under the list. Click on 'retrieve' next to the email address. If everything is working properly, you should get a message something like:

Mailhandler retrieve successful: 1 messages for incoming@example.com

You should then be able to go to and find the message that you submitted at:
Admin -> Content

Assuming this is running properly, all you need to do is make sure that cron is running regularly and emails will be processed as they are received.

Showing message in the content which is retrieved

I am describing following points which will provide help in retrieving the mail and showing it in the content

Guide maintainers

Shai's picture