Title: Help with Post by email: SQL database error
Last modified: August 18, 2016

---

# Help with Post by email: SQL database error

 *  Resolved [doc](https://wordpress.org/support/users/doc/)
 * (@doc)
 * [20 years, 6 months ago](https://wordpress.org/support/topic/help-with-post-by-email-sql-database-error/)
 * Hi,
 * I am brand new to WordPress as of this weekend after trying Moveable Type, Drupal,
   Mambo and CityDesk. WordPress is undoubtably the best.
 * I have been able to get most things working out of the box or with a few tweaks
   with the basic php knowledge that I have.
 * However, I have been stopped dead in the water on trying to set up posting by
   email. When I run …/wordpress/wp-email.php, I get the following errors. Can any
   of you gurus point me in the right direction? I have been scouring the online
   documentation, but have not been successful in finding any clues.
 * Thanks!
 * – – – – – – – – – – – – – – – – – – – – – – – – – – – –
 * Author = [address@gmail.com](https://wordpress.org/support/topic/help-with-post-by-email-sql-database-error/address@gmail.com?output_format=md)
 * Content-type: multipart/alternative, boundary: —-=_Part_9316_23161291.1132763102608
 * Raw content:
 * Content-Disposition: inline
 * Well, I have always wanted to do this, so let’s see if I can post a blog di=
   
   rectly from an email client!
 * WordPress database error: [You have an error in your SQL syntax. Check the manual
   that corresponds to your MySQL server version for the right syntax to use near‘
   s see if I can post a blog di= rectly from an email client!
 * INSERT INTO wp_posts (post_author, post_date, post_date_gmt, post_modified, post_modified_gmt,
   post_content, post_title, post_excerpt, post_category, post_status, post_name,
   comment_status, ping_status, post_parent) VALUES (‘2’, ‘2005-11-23 16:25:02’,‘
   2005-11-23 16:25:02’, ‘2005-11-23 16:25:02’, ‘2005-11-23 16:25:02’, ‘Content-
   Disposition: inline Well, I have always wanted to do this, so let’s see if I 
   can post a blog di= rectly from an email client!
    ‘, ‘A blog from an email appliance’,”,‘
   1’, ‘publish’, ‘a-blog-from-an-email-appliance’, ‘open’, ‘open’, ‘0’)
 * WordPress database error: [You have an error in your SQL syntax. Check the manual
   that corresponds to your MySQL server version for the right syntax to use near”
   at line 3]
    SELECT category_id FROM wp_post2cat WHERE post_id =
 * WordPress database error: [You have an error in your SQL syntax. Check the manual
   that corresponds to your MySQL server version for the right syntax to use near‘
   1)’ at line 2]
    INSERT INTO wp_post2cat (post_id, category_id) VALUES (, 1)
 * WordPress database error: [You have an error in your SQL syntax. Check the manual
   that corresponds to your MySQL server version for the right syntax to use near”
   at line 1]
    SELECT pinged FROM wp_posts WHERE ID =

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [jwurster](https://wordpress.org/support/users/jwurster/)
 * (@jwurster)
 * [20 years, 6 months ago](https://wordpress.org/support/topic/help-with-post-by-email-sql-database-error/#post-287257)
 * I got this error, too. You probably have an apostrophe oor quotes in the email
   subject or in your email content. wp-mail doesn’t like this. There are some fixes
   to this if you search the forum.
 *  [jaminadi](https://wordpress.org/support/users/jaminadi/)
 * (@jaminadi)
 * [20 years, 6 months ago](https://wordpress.org/support/topic/help-with-post-by-email-sql-database-error/#post-287288)
 * One of the posts that gives the answer is [http://wordpress.org/support/topic/40887](http://wordpress.org/support/topic/40887)
   
   But really, if this is a known issue, with a SIMPLE fix why has this not been
   added to the release? It seems ridiculous to me that this would still be an issue
   months after it has been solved.
 *  Thread Starter [doc](https://wordpress.org/support/users/doc/)
 * (@doc)
 * [20 years, 6 months ago](https://wordpress.org/support/topic/help-with-post-by-email-sql-database-error/#post-287350)
 * Many thanks for the links and help. The apostrophe was exactly the culprit!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Help with Post by email: SQL database error’ is closed to new replies.

## Tags

 * [by](https://wordpress.org/support/topic-tag/by/)
 * [database](https://wordpress.org/support/topic-tag/database/)
 * [email](https://wordpress.org/support/topic-tag/email/)
 * [sql](https://wordpress.org/support/topic-tag/sql/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 3 participants
 * Last reply from: [doc](https://wordpress.org/support/users/doc/)
 * Last activity: [20 years, 6 months ago](https://wordpress.org/support/topic/help-with-post-by-email-sql-database-error/#post-287350)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
