trouble using php mail function to post by email (3 posts)

  1. cthress
    Posted 4 years ago #

    I'm having trouble with a php script I wrote that takes advantage of the post by email functionality built into WordPress, and I was hoping someone might be able to help.

    I created a form for my company, where our customers can enter a title, blog content, and upload an image to add entries to their WordPress (or other platform) blog. The form takes advantage of the post by email functionality built into WordPress and most other major blogging platforms. The form includes fields for a "from" address and "to" address, too, so the PHP mail script knows where to submit the results.

    I've tested the form on multiple platforms (not just WordPress), and it seems to work for virtually every platform, except WordPress. When I submit the form using a "to" address that is tied to one of my test WordPress blogs, the mail function returns true, indicating that the mail was successfully sent, but the post does not appear on the WordPress blog, either as a draft or as a live post. I get the same results on both a self-hosted WordPress blog and on a WordPress-hosted blog.

    However, if I set the "to" address to my own email address and then forward the email I receive to my special WordPress-generated email address, it posts just fine. I've tested this both with and without the image upload to see if that makes any difference, but it doesn't seem to matter.

    Anyway, I checked the forums to see if anyone else had encountered this issue before, but I didn't see any open cases. So I thought I'd go ahead and start a new ticket.

    If anyone has encountered this and knows how to solve it (or if it's something that can't be resolved), please let me know. I'd be happy to provide my php script if that helps.



  2. I'm not sure whether you are referring to issues with WordPress.com or a self-hosted WordPress.org install.

    If WordPress.com you need to contact WordPress.com support - http://en.support.wordpress.com/contact/

    If WordPress.org we need more information about how you are configured to help you diagnose but the post-by-email support in core is not in current development and only works with a small subset of email providers

  3. cthress
    Posted 4 years ago #

    Both, really. The form I created (and associated PHP script) simply generates an email that gets sent to whatever email address the person filling out the form provides. Any images uploaded through the form are sent as attachments on the email message.

    If I'm reading your response correctly, it sounds like what I'm trying to do might not be supported by WordPress. If that's the case, please let me know. Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic