Multiple custom extensions for sending emails when called

Change the dialplan to:

[send-email]
exten => _.,1,NoOp(Entering user defined context  [send-email] in extensions_custom.conf)
exten => _.,n,set(emailaddresss=${STRREPLACE(EXTEN,:,@)})
exten => _.,n,System(echo 'Call from ${CALLERID(name)} at  ${CALLERID(number)}' | mail -s 'SUBJECT' '${emailaddresss}')
exten => _.,n,hangup()

Then the custom dial string becomes:

local/email:domain.com@send-email

you replace the @ symbol in the email address with a :

1 Like