Scroll export button | ||||||||
---|---|---|---|---|---|---|---|---|
|
Info |
---|
The document describes ways of configuring Dialplan to send an email. Created: October 2023 Permalink: https://wildix.atlassian.net/wiki/x/AQCnEQ |
Table of Contents
There are several ways you can send email from Dialplan:
Option 1:
...
Use '
...
sendemail'
...
application
1. Add Custom application in Dialplan
2. In the Custom application field, enter the following data:
Code Block |
---|
System(echosendemail "email body" | mutt -F /etc/companies.d/0/Muttrc -s youremail@domain.com" "email subject" youremail@domain.com) -a"email body" /path/to/some_attachment_file.wav) |
Where you need to replace the following points with the relevant info:
- email body: the the content of your email
- email subject: the subject of your email
- youremail@domain.com: replace with the email address where the email should be sent from
Option 2: Use 'sendemail' application
...
2. In the Custom application field, enter the following data:
...
- /path/to/some_attachment_file.wav
...
Where you need to replace the following points with the relevant info:
- email body: the the content of your email
- email subject: the subject of your email
- youremail@domain.com: replace with the email address where the email should be sent from
...
- : path to the file you want to attach to the email
Option 2: Use HTML template file
This method allows you to compose a more complex email using an HTML template file.
...
Code Block |
---|
System(echo '<html><head></head><body> Missed call from ${CALLERID(name)} from the number <a href=\"tel:${CALLERID(num)}\">${CALLERID(num)}</a>.</body></html>' > /tmp/mail_${UNIQUEID}) |
...
Code Block |
---|
System(sendemail \"youremail@domain.com\" \"email subject" /var/lib/callweaver/sounds/00000path/to/some_attachment_file.wav < /tmp/mail_${UNIQUEID}) |
...