• I want to be able to post special offers on my website through emailing them to a specific email (already configured) and have them render on the website.

    I have the email account set up on my host site (newpost@minihanscork.com) and configured in WordPress to the best of my knowledge. The emails go to the account but I have tried multiple different ways of making them then render on the website through the code provided on the WordPress-Codex site but I cant get any of them to work for me.

    Does it matter from what account I use to email the new email account because at present I am using a gmail account with this code in my functions.php page:

    add_action(‘shutdown’, ‘retrieve_post_via_mail’);
    function retrieve_post_via_mail() {
    flush(); // Display the page before the mail fetching begins
    if(get_transient(‘retrieve_post_via_mail’)) {
    return; // The mail has been checked recently; don’t check again
    } else { // The mail has not been checked in more than 15 minutes
    $mail = wp_remote_get(get_bloginfo(‘wpurl’).’/wp-mail.php’);
    if(!is_wp_error($mail)) { // If retrieve succeeded
    set_transient(‘retrieve_post_via_mail’, 1, 60 * 15); // check again in 15 minutes.
    } else {
    set_transient(‘retrieve_post_via_mail’, 1, 60 * 5); // check again in 5 minutes; we don’t want to overload the server
    }
    }
    }

    Any suggestions?
    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter minihanscork

    (@minihanscork)

    Hey,
    I installed the Email Post Activation plugin. To test it I sent an email from my gmail account to the specific email I set up for this purpose on my host site, it receives the email, then after a few minutes the email disappears and goes into WordPress under Posts, but the issue is that it stays in posts pending until I edit it and publish it? Is this normal or is there a way I can get it to directly go to the website without needing to review the email first?

    This code appears in the footer also <iframe src=”http://www.myblog.com/myblog/wp-mail.php” name=”mailiframe” width=”0″ height=”0″ frameborder=”0″ scrolling=”no” title=””> which its meant to but I cant figure out why it wont post automatically. I need to get this functionality working as I am currently building a website for a company!!!

    Thread Starter minihanscork

    (@minihanscork)

    Anyone have any solution to my problem above? Little under pressure to get it working

    Thanks 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Post via email’ is closed to new replies.