How to convert your blog commentators to your YMLP subscribers

by KishPress on September 25, 2010

If you are using YourMailingListProvider for news letters, then you can use the API features to convert your visitors who comment on your blog to your newsletter subscriber.

function kish_ymlp_add_commenters($comment_ID){global $blog_id;require_once 'YMLP_API.class.php';// variables: your key & username$ApiKey = "yourapikey";$ApiUsername = "yourYMLPusername";$GroupID="GroupId of your newsletter list";// create API class$api = new YMLP_API($ApiKey,$ApiUsername);$com = get_comment($comment_ID);$name = $com->comment_author;$Email= $com->comment_author_email;$OtherFields["Field1"]=$name;if($GroupID=="" || $com->comment_approved=='spam') {return false;}else {$OverruleUnsubscribedBounced = "0";$output=$api->ContactsAdd($Email,$OtherFields,$GroupID,$OverruleUnsubscribedBounced);}}add_action('comment_post', 'kish_ymlp_add_commenters');

Your can download the YMLP_API.class.php file from your YMLP dashboard under the API menuI feel its not fair to just automatically subscribe your blog responders without their knowledge. You can have a check box under the comment submit form and let them check if they want to sign-up for your news letter.

Related posts:

  1. WordPress comment Moderation Plugin Kish Multi Pro is not just for doing new Posts,...
  2. Managing Multiple Twitter Accounts from your WordPress Blog Many of us has more than one twitter account and...
  3. WordPress Comment Moderation Tool (WordPress Plugin) There are many blog owners who get tons of comments...
  4. Best Blog Posting tool for iPad I was trying to write new posts using Kish Multi...
  5. How to use post slug as a class name for body You can do this by editing your blog template and...

Leave a Comment

Previous post:

Next post: