Support » Plugin: IdeaPush » Send email when new idea is posted

  • Resolved pedropamn

    (@pedropamn)


    Hi

    There is any way to send an email to specific address (not admin) every time an idea is posted?

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Northern Beaches Websites

    (@northernbeacheswebsites)

    Hi @pedropamn,

    In the plugin settings in the “notifications” tab the setting at the top is: “Admin Notification Email” this setting enables you to enter in the admin email address.

    At the moment the admin address can just be one address. But we do provide actions so you can hook in to the plugin and send additional notifications if necessary. Please see the FAQ item in the plugin settings: “I am a developer, can I hook into some of the events created by the plugin?”

    And we have an action called “idea_push_after_idea_created” which you could then send an email from. This requires PHP knowledge to do this. If you need additional assistance with this please purchase the pro version as I provide customised support for things like this. Thanks,

    Thread Starter pedropamn

    (@pedropamn)

    I solve this putting the follow code in my functions.php:

     function send_email_idea_created($newIdeaId){
    	 $title = get_the_title($newIdeaId);
    	 $link_post = get_post_permalink($newIdeaId);
    	
    	wp_mail('email@example.com', 'My Subject', 'New idea: '.$title.' in the link '.$link_post);
    
    }
    add_action('idea_push_after_idea_created', 'send_email_idea_created', 100);

    Works fine =D

    But i have a observation: idea_push_after_idea_created just pass 1 parameter ($newIdeaId), but i think that he should pass 4, as it is in the FAQ ($newIdeaId, $userId, $title, $description).. So, I needed to get the title and the link with WordPress functions…

    But, any way, is working now šŸ™‚

    Thread Starter pedropamn

    (@pedropamn)

    Another question: The email that i put in “Admin Notification Email” will receive only new ideas notification?

    Plugin Author Northern Beaches Websites

    (@northernbeacheswebsites)

    Hi @pedropamn,

    The email entered in the admin notification email setting will receive the admin notifications enabled in the 2 settings below it i.e.

    Receive admin notifications when any idea is submitted
    Receive admin notifications when an idea is ready for review

    Thanks,

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Send email when new idea is posted’ is closed to new replies.