WordPress.org

Ready to get started?Download WordPress

Forums

Sending users email on post publish (10 posts)

  1. prionkor
    Member
    Posted 3 years ago #

    Hi, i think it is quite advanced questions. :)

    I have a front end posting form where registered users can draft business listings. I have a meta field which contains email of the user who draft the business. Now i want when moderators publish the business the user will notified via email that his business is listed successfully.

    Can anyone give me direction how to send email upon the publishing of a post?

    Thanks!

  2. prionkor
    Member
    Posted 3 years ago #

    Hi, its been one day and no one answer. Dear moderators if possible you please move the topic to the advance.

    Thanks!

  3. prionkor, I KNOW I've mentioned this before, but stop abusing tags. Yes, it's nice you think I can help you with anything, but I can't and, in fact, have NO idea with this one, nor have I the time to research it right now.

    Stop tagging things with 'ipstenu' all the time.

    Stop bumping your posts.

    Learn to be patient. This is already in advanced.

  4. prionkor
    Member
    Posted 3 years ago #

    Hi, it was the first one i tagged you in long time. First one in this month. I did not knew it bother you that much! really sorry for it. I just hoped that you could help.

    Take care. Won't bother you again!!

  5. It bothers me that you tag me so often. It makes the use of the tag ineffectual to tag me for any advanced problem that doesn't get answers. There was a point where ALL the threads tagged for me were by you, and it was a hell of a lot of your posts. MOST of the time, you may not have noticed, I just remove the tag. So use it when you need MY help.

    If it's a general 'Hey, I need ANY moderator to move/edit/delete something.' you should use modlook.

    If you KNOW you need ME (and realistically, if you're smart enough to tag if for me, you're smart enough to know where my skills lie), then tag it for me.

    Otherwise you're abusing the system.

    There's no known plugin to email a submitter when their post is published. http://subscribe2.wordpress.com/ emails a mailing list. You'll have to write this custom code yourself, especially since you're grabbing from a meta field. Hook into 'on publish' to grab that content and, if not blank, email them a message.

  6. Joseph G.
    Member
    Posted 3 years ago #

    <?php
    function send_email(){
    $to = "recipient@example.com";
    $subject = "Hi!";
    $body = "Hi,\n\nHow are you?";
    if (mail($to, $subject, $body)) {
    echo("<p>Message successfully sent!</p>");
    } else {
    echo("<p>Message delivery failed...</p>");
    }
    }

    add_action('publish_post','send_email()');
    ?>

    HAPPY KODING!!! keke~

  7. prionkor
    Member
    Posted 3 years ago #

    Hi, thanks for your reply!

    You code will send email to the user on every post publish? I am publishing a custom post. When the custom post will publish the function will take the email from the meta field then send the email. :)

    I searched around the web last couple of day. Did not find anything useful.

  8. Monika
    Member
    Posted 3 years ago #

    prionkor

    this is a very special thing, try to find a coder and invest some money and you have this in a couple of hours.

  9. tazatek
    Member
    Posted 3 years ago #

    Perhaps this plugin will help...

    worth2read.org/2010/02/21/wordpress-plugin-send-notification-by-email-when-a-post-is-published/

  10. Ovidiu
    Member
    Posted 3 years ago #

    that plugin looks perfect for what he asked for. here is another one you can mod a bit to get what you need: http://wordpress.org/extend/plugins/peters-collaboration-e-mails/

Topic Closed

This topic has been closed to new replies.

About this Topic