Jump to content

Invoice Paid Feedback Email


Recommended Posts

Hello,

 

I am a newbie and do not know much about programming. I need to send an email to the customer after paying the invoice. I tried to use the hooks but due to less knowledge was not able to get it through.

Below is my code and email template which I want to send mail is "Invoice Paid Feedback Mail"

 

<?php 
function hook_InvoicePaid($vars) 
{ 
   $command = "SendEmail"; 
   $adminuser = "admin"; 
   $values = array( 'messagename' => 'Invoice Paid Feedback Mail',);

   $results = localAPI($command,$values,$adminuser); 
} 
add_hook("InvoicePaid",1,"hook_InvoicePaid"); 

?>

 

Please help me in achieving this.

 

Thanks in advance.

AKA

Link to comment
Share on other sites

doesn't the customer already receive an email after paying the invoice (or at least when payment is confirmed) - "Invoice Payment Confirmation"...?? could you modify that template to include the content of this additional email that you're trying to send ?

 

alternatively, you may be able to tweak the email marketer to do this - http://docs.whmcs.com/Email_Marketer

Link to comment
Share on other sites

Hey Brain, Thanks for spending your time on my post.

 

Actually I want to send two separate mails. One mail for invoice payment confirmation and another mail to ask the client about their experience on the whole process.

 

For email marketer it will run via cron and I need to send it at the same time when an invoice is marked paid.

 

It would be great if you can help me with the hooks coding.

 

AKA

Link to comment
Share on other sites

Actually I want to send two separate mails. One mail for invoice payment confirmation and another mail to ask the client about their experience on the whole process.

For email marketer it will run via cron and I need to send it at the same time when an invoice is marked paid.

personally, I'm not sure if I were a customer whether I would like this... depending on your setup, as a new customer I might receive a welcome email, an invoice email, a payment confirmation email and then your feedback email... it might not be a bad idea to delay the feedback email (if you must send it separately) to give the customer some time to reflect on the process rather than send them numerous emails.

 

it might also depend on your feedback method - are you expecting them to email you back or directing them to a survey/questionnaire web link? if it's a web link, then I would just include it in the payment confirmation email.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated