Daniel Posted March 7, 2009 Share Posted March 7, 2009 I had this created a while ago and have not been using it recently, however it should work fine with the latest version. This is a simple php script that runs on a daily cron to email clients 45 days after signup. This can be used to ask for feedback or to upsell a product. Download Link 0 Quote Link to comment Share on other sites More sharing options...
handsonwebhosting Posted March 7, 2009 Share Posted March 7, 2009 Nice Idea. We do this currently, but a premade module would be helpful. Thanks for contributing! 0 Quote Link to comment Share on other sites More sharing options...
LemonBarley Posted March 8, 2009 Share Posted March 8, 2009 nice idea. installing it 0 Quote Link to comment Share on other sites More sharing options...
LemonBarley Posted March 8, 2009 Share Posted March 8, 2009 hmm. Daniel maybe you want to provide a template for people to use as well? 0 Quote Link to comment Share on other sites More sharing options...
Daniel Posted March 8, 2009 Author Share Posted March 8, 2009 The email template can be absolutely anything you like, we've not used this since around WHMCS 3.4 and no longer have the template that we used. I'm sure it said something along the lines of "We're happy to tell you you've been with XYZHosting for 45 days now and thought we'd send a quick email to check you're happy with the service blah blah blah.." I'm sure you can come up with something 0 Quote Link to comment Share on other sites More sharing options...
jasonhk Posted March 8, 2009 Share Posted March 8, 2009 I think using the API would be a lot easier, this API function probably wasn't around when the script above was written but using the API is probably the better way function send_notice($message_name,$client_id) { $url = "http://www.yourdomain.com/whmcs/includes/api.php"; # URL to WHMCS API file $username = "Admin"; # Admin username goes here $password = "demo"; # Admin password goes here $postfields["username"] = $username; $postfields["password"] = md5($password); $postfields["action"] = "sendemail"; $postfields["messagename"] = $message_name; $postfields["id"] = $client_id; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 100); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields); $data = curl_exec($ch); curl_close($ch); $data = explode(";",$data); foreach ($data AS $temp) { $temp = explode("=",$temp); $results[$temp[0]] = $temp[1]; } if ($results["result"]=="success") { # Result was OK! } else { # An error occured echo "The following error occured: ".$results["message"]; } } 0 Quote Link to comment Share on other sites More sharing options...
flip Posted March 24, 2009 Share Posted March 24, 2009 Jason: Wow! 0 Quote Link to comment Share on other sites More sharing options...
flip Posted March 24, 2009 Share Posted March 24, 2009 EDIT: Any updated instructions possible? What to do with your API? (: thanks! 0 Quote Link to comment Share on other sites More sharing options...
jasonhk Posted March 24, 2009 Share Posted March 24, 2009 Flip, the downloaded script doesn't use the API, I gave the API code example above as it's a better way to send mail then by using curl to login and send the mail. 0 Quote Link to comment Share on other sites More sharing options...
Operator Posted March 25, 2009 Share Posted March 25, 2009 flip if you want more info on what the whmcs api can do see the documentation there are 3 pages on it. 0 Quote Link to comment Share on other sites More sharing options...
flip Posted March 25, 2009 Share Posted March 25, 2009 Thanks you guys! So what file would post #6 go into? Thanks again! 0 Quote Link to comment Share on other sites More sharing options...
Operator Posted March 25, 2009 Share Posted March 25, 2009 hey flip i sent you a private message on the forum check it. 0 Quote Link to comment Share on other sites More sharing options...
growe Posted April 5, 2009 Share Posted April 5, 2009 I'm gonna look at setting this up. I just read another thread that redirected me to this one. It seems a fair amount of people would be interested in this. Could this be added as a standard feature? 0 Quote Link to comment Share on other sites More sharing options...
atDev Posted May 16, 2009 Share Posted May 16, 2009 Is there a way of including custom variables in the email? 0 Quote Link to comment Share on other sites More sharing options...
DraGoNeTi Posted December 8, 2018 Share Posted December 8, 2018 reupload and update it for v7, please 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted December 8, 2018 Share Posted December 8, 2018 23 minutes ago, DraGoNeTi said: reupload and update it for v7, please the addon would be irrelevant now - you can do the same thing using the built in Email Marketer... Quote The email marketer tool allows you to schedule automated emails to be sent out to your clients when certain events and/or criteria are met. https://blog.whmcs.com/?t=67270 1 Quote Link to comment Share on other sites More sharing options...
DraGoNeTi Posted December 8, 2018 Share Posted December 8, 2018 hmm... i didn't think of that... ! thanks, i will give it a try 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.