Voicemail Notifications are HTML but not sent as HTML

Status
Not open for further replies.

fusionpbxuser888

New Member
Jan 6, 2018
18
0
1
53
Hello:

This was an issue I had and found a solution here: https://github.com/fusionpbx/fusionpbx/issues/2578#issuecomment-328230582

Unfortunately, an update I did to FusionPBX have broken my fix, and doubly-unfortunately all the issues have been deleted from Github so I can not visit that URL to find the solution again. Obviously, I should have noted the solution instead of noting only the URL to the solution.

Anyway, the problem is when my FusionPBX sends me an email notifying me about a missed call or sends me a voicemail attachment the message is full of HTML tags, but the header/flags of that email do not indicate it is HTML and thus should be rendered as HTML by my email client. So I see a bunch of gibberish html flags and formatting.

I am on FusionPBX stable v 4.2 branch and just updated to current which is 4.2.4.

Thanks.
 

Adrian Fretwell

Well-Known Member
Aug 13, 2017
1,415
376
83
Hello fusionpbxuser888,
I have had a closer look at the emails from my FusionPBX (4.2.3) and the email source looks quite correct. I have the email method set to smtp which uses PHPMailer 5.2.2 (http://code.google.com/a/apache-extras.org/p/phpmailer/).
The message that gets delivered is tagged as multipart/mixed for the message/attachment and is also tagged multipart/alternative for the plain and html versions of the message:
Code:
<snip>
Content-Type: multipart/mixed;
    boundary="b1_e95b2717c604a5f9e02a7f131d0068fc"

--b1_e95b2717c604a5f9e02a7f131d0068fc
Content-Type: multipart/alternative;
    boundary="b2_e95b2717c604a5f9e02a7f131d0068fc"

--b2_e95b2717c604a5f9e02a7f131d0068fc
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

New Voicemail To 201 (School House Extension) From 202 Received Monday, 08 Jan 2018 05:52 AM --> Message Attached Length 00:00:07

--b2_e95b2717c604a5f9e02a7f131d0068fc
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

<html><table width="400" border="0" cellspacing="0" cellpadding="0" align="center"style="border: 1px solid #cbcfd5;-moz-border-radius: 4px;-webkit-border-radius: 4px; border-radius: 4px;"><tr><td valign="middle" align="center" bgcolor="#e5e9f0" style="background-color: #e5e9f0;color: #000; font-family: Arial; font-size: 14px; padding: 7px;-moz-border-radius: 4px;-webkit-border-radius: 4px; border-radius: 4px;"><strong>New Voicemail</strong></td></tr><tr><td valign="top" style="padding: 15px;"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td style="color: #333; font-family: Arial; font-size: 12px; padding-bottom: 11px;"><strong>To</strong></td><td style="color: #666; font-family: Arial; font-size: 12px; padding-bottom: 11px;">201 (School House Extension)</td></tr><tr><td style="color: #333; font-family: Arial; font-size: 12px; padding-bottom: 11px;" width="20%"><strong>From</strong></td><td style="color: #666; font-family: Arial; font-size: 12px; padding-bottom:
11px;" width="80%">202</td></tr><!--<tr><td style="color: #333; font-family: Arial; font-size: 12px; padding-bottom: 11px;"><strong>Received</strong></td><td style="color: #666; font-family: Arial; font-size: 12px; padding-bottom: 11px;">Monday, 08 Jan 2018 05:52 AM</td></tr>--><tr><td style="color: #333; font-family: Arial; font-size: 12px; padding-bottom: 11px;"><strong>Message</strong></td><td style="color: #666; font-family: Arial; font-size: 12px; padding-bottom: 11px;">Attached</td></tr><tr><td style="color: #333; font-family: Arial; font-size: 12px; padding-bottom: 11px;"><strong>Length</strong></td><td style="color: #666; font-family: Arial; font-size: 12px; padding-bottom: 11px;">00:00:07</td></tr></table></td></tr></table></html>

<br><br>

--b2_e95b2717c604a5f9e02a7f131d0068fc--

--b1_e95b2717c604a5f9e02a7f131d0068fc
Content-Type: audio/x-wav; name="msg_244459f0-c70a-467e-bf09-b3e9edf1dc1f.wav"
Content-Transfer-Encoding: base64
<snip>

I'm assuming your email message source shows html tags in a text/plain content section?
A.
 

smn

Member
Jul 18, 2017
201
20
18
When I had this problem recently it was because I was using sendmail instead of the mailer app.

Assuming you already have your smtp settings configured.
http://fusionpbx-docs.readthedocs.io/en/latest/getting_started/voicemail_to_email.html

Go into /etc/freeswitch/autoload_configs/switch.config.xml

Replace
Code:
<param name="mailer-app" value="sendmail"/>-->

with
Code:
<param name="mailer-app" value="/usr/bin/php /var/www/html/secure/v_mailto.php"/>
      <param name="mailer-app-args" value="-t"/>
and restart freeswitch.

If your root directory is something else like /var/www/html/fusionpbx instead of /var/www/html/

Then alter the above accordingly.
 
Last edited:
Status
Not open for further replies.