Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Scroll export button
scopecurrent
template-id0fa09813-8b86-460a-aa1d-ef450a80e9ce
quick-starttrue
add-onScroll PDF Exporter

Info

The document describes ways of configuring Dialplan to send an email.

Created: October 2023

Permalink: https://wildix.atlassian.net/wiki/x/AQCnEQ

...

There are several ways you can send email from Dialplan:

Option 1

...

1. Add Custom application in Dialplan

2. In the Custom application field, enter the following data:

Code Block
System(echo "email body" | mutt -F /etc/companies.d/0/Muttrc -s "email subject" youremail@domain.com) -a /path/to/attachment

Where you need to replace the following points with the relevant info: 

...

:

...

Image Removed

...

 Use 'sendemail' application 

1. Add Custom application in Dialplan

...

Code Block
System(sendemail \"youremail@domain.com\" \"email subject\" \"email body\" /varpath/lib/callweaver/sounds/00000/to/some_attachment_file.wav)

...

  • 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/some_attachment_file.wav: 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(sendemail \"youremail@domain.com\" \"email subject" /var/lib/callweaver/sounds/00000path/to/some_attachment_file.wav < /tmp/mail_${UNIQUEID})

...