Jump to content

Pass custom fields on order to shell script


gazp

Recommended Posts

I am trying to get WHMCS to pass variables to a script that registers new email addresses.

 

I have the shell command postfixadmin-cli set up to create new email addresses and I have a product order working that accepts custom fields (validated email address and password fields).

 

However, I'm not sure how to get these fields passed to a shell script.

 

Would I use the CustomFieldSave hook to achieve this?

 

The bash script that I need to call look like this:

```bash
#!/bin/bash -x
uaddress=$1
upassword=$2
postfixadmin-cli mailbox add $useraddress --password $upassword --password2 $upassword
```

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