HI
does anyone have a running hook that could send a email, with full info like after tenant creation it should send a email that a new tenant named ${TENANT} hes been created
i have been trying the following but with no luck
#!/bin/bash
# script to send simple email
# email subject
SUBJECT="New Extension has been created"
# Email To ?
EMAIL="admin@voore.com"
# Email text/message
EMAILMESSAGE="/hadata/mail.txt"
echo "Hi Admin"> $EMAILMESSAGE
echo "This is an automated email to let you know that ${EXTENSION} under $TENANT has been created"> $EMAILMESSAGE
echo "" >>$EMAILMESSAGE
echo "" >>$EMAILMESSAGE
echo "please update the billing records" >>$EMAILMESSAGE
# send an email using /bin/mail
/bin/mail -s "$SUBJECT" "$EMAIL" < $EMAILMESSAGE
any help would be appreciated
its because you're using
its because you're using bogus variables...
to get a list of every variable available to your script put the command printenv in your script to mail you a list of every variable.. you can find what the name of the variable you are looking for that shows the tenant name that got added.
to get a list of every
to get a list of every variable available to your script put the command printenv in your script to mail you a list of every variable
#!/bin/bash
# script to send simple email
# email subject
SUBJECT="VARS"
# Email To ?
EMAIL="admin@voore.com"
# Email text/message
EMAILMESSAGE="/hadata/mail.txt"
VARS=`printenv`
echo $VARS > $EMAILMESSAGE
# send an email using /bin/mail
/bin/mail -s "$SUBJECT" "$EMAIL" < $EMAILMESSAGE
could we have the mac address
could we have the mac address there too (in case of extension create/modify) ?
Looks like provisioning in TL is only supported in dhcp mode. We use provisioning via separate https for linksys phones and it would be nice to make/modify an entry there via the event hook .
Hans
is the mail at least being sent? Albeit with empty variables...