Summary:ASTERISK-00977: emailbody in voicemail.conf broken
Reporter:denon (denon)Labels:
Date Opened:2004-02-02 13:01:19.000-0600Date Closed:2004-09-25 02:18:23
Versions:Frequency of
Description:We've been using emailbody just fine for months now, however in the past week or so, it's broken.

I've currently got something like:
emailbody=New voicemail: ${VM_CALLERID} on ${VM_DATE}.\nMessage #${VM_MSGNUM} in mailbox ${VM_MAILBOX} for ${VM_NAME} lasting ${VM_DUR},\n\n\t\t\t\t--CCS PBX\n

The only thing that shows up is the linefeeds and the tab, with "--CCS PBX". The rest of the message is gone.
Comments:By: gclark (gclark) 2004-02-19 19:27:56.000-0600

I was able to resolve this by adding the following syntax -----

emailbody=:\n\n\tDear ${VM_NAME}:\n\n\tJust wanted to let you know you were just left a ${VM_DUR} long message (number ${VM_MSGNUM})\nin mailbox ${VM_MAILBOX} from ${VM_CALLERID}, on ${VM_DATE} so you might\nwant to check it when you get a chance.  Thanks!\n\n\t\t\t\t--Asterisk\n

By: daiy (daiy) 2004-02-20 05:44:32.000-0600

I think this is how emails work. It needs some blank line(s) between the headers and body. So that's why the first one only show's "--CCS PBX" in the email, becuse all the rest went to the email header :)

To fix this, just add \n\n to the beginning of emailbody as gclark pointed out.

By: denon (denon) 2004-02-20 17:35:23.000-0600

yeah, looks like you only need one \n at the beginning. I think this should be chalked up to a bug, as the configuration is actually the "email body", not really saying it needs the linefeed before it. Besides, anything that needs to be static may as well be hardcoded in.

By: zoa (zoa) 2004-02-21 04:34:39.000-0600

could somebody provide us a diff ?

By: James Golovich (jamesgolovich) 2004-02-22 02:07:55.000-0600

Is this happening only when setting your own emailbody?  Looking at the code it seems like it should be happening in either case.  If it is then it should be as simple as adding another \n at the end of line 744 in the code.  If it only happens with emailbody set then its just as easy to fix, but I want some confirmation before going ahead with this fix

By: Tilghman Lesher (tilghman) 2004-02-23 18:07:18.000-0600

I don't suppose we could just document this behavior?  Seems rather handy to be able to set your own headers, if need be.

By: denon (denon) 2004-02-23 18:32:38.000-0600

I think that's kinda silly, really, to have it in the "body".  How about an optional emailheaders= config?

By: James Golovich (jamesgolovich) 2004-02-23 18:51:41.000-0600

I'd agree with denon.  if we want to add headers do it with another var.

Do we know if this happens without email body as well?

By: James Golovich (jamesgolovich) 2004-02-25 17:08:50.000-0600

Fixed in CVS (HEAD and -stable)

If someone thinks we should be able to add headers to the email, they should open up a feature request bugnote on it