mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-14 00:24:05 +00:00
Allow characterset to be specified (bug #1598)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2943 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -238,6 +238,7 @@ static int pbxskip = 0;
|
|||||||
static char *emailsubject = NULL;
|
static char *emailsubject = NULL;
|
||||||
static char fromstring[100];
|
static char fromstring[100];
|
||||||
static char emailtitle[100];
|
static char emailtitle[100];
|
||||||
|
static char charset[32] = "ISO-8859-1";
|
||||||
|
|
||||||
|
|
||||||
STANDARD_LOCAL_USER;
|
STANDARD_LOCAL_USER;
|
||||||
@@ -867,7 +868,7 @@ static int sendmail(char *srcemail, struct ast_vm_user *vmu, int msgnum, char *m
|
|||||||
|
|
||||||
fprintf(p, "--%s\n", bound);
|
fprintf(p, "--%s\n", bound);
|
||||||
}
|
}
|
||||||
fprintf(p, "Content-Type: text/plain; charset=ISO-8859-1\nContent-Transfer-Encoding: 8bit\n\n");
|
fprintf(p, "Content-Type: text/plain; charset=%s\nContent-Transfer-Encoding: 8bit\n\n", charset);
|
||||||
strftime(date, sizeof(date), "%A, %B %d, %Y at %r", &tm);
|
strftime(date, sizeof(date), "%A, %B %d, %Y at %r", &tm);
|
||||||
if (emailbody) {
|
if (emailbody) {
|
||||||
struct ast_channel *ast = ast_channel_alloc(0);
|
struct ast_channel *ast = ast_channel_alloc(0);
|
||||||
@@ -3828,6 +3829,7 @@ static int load_config(void)
|
|||||||
}
|
}
|
||||||
memset(fromstring,0,sizeof(fromstring));
|
memset(fromstring,0,sizeof(fromstring));
|
||||||
memset(emailtitle,0,sizeof(emailtitle));
|
memset(emailtitle,0,sizeof(emailtitle));
|
||||||
|
strncpy(charset, "ISO-8859-1", sizeof(charset) - 1);
|
||||||
if (emailbody) {
|
if (emailbody) {
|
||||||
free(emailbody);
|
free(emailbody);
|
||||||
emailbody = NULL;
|
emailbody = NULL;
|
||||||
@@ -3840,6 +3842,8 @@ static int load_config(void)
|
|||||||
pbxskip = ast_true(s);
|
pbxskip = ast_true(s);
|
||||||
if ((s=ast_variable_retrieve(cfg, "general", "fromstring")))
|
if ((s=ast_variable_retrieve(cfg, "general", "fromstring")))
|
||||||
strncpy(fromstring,s,sizeof(fromstring)-1);
|
strncpy(fromstring,s,sizeof(fromstring)-1);
|
||||||
|
if ((s=ast_variable_retrieve(cfg, "general", "charset")))
|
||||||
|
strncpy(charset,s,sizeof(charset)-1);
|
||||||
if ((s=ast_variable_retrieve(cfg, "general", "emailtitle")))
|
if ((s=ast_variable_retrieve(cfg, "general", "emailtitle")))
|
||||||
strncpy(emailtitle,s,sizeof(emailtitle)-1);
|
strncpy(emailtitle,s,sizeof(emailtitle)-1);
|
||||||
if ((s=ast_variable_retrieve(cfg, "general", "emailsubject")))
|
if ((s=ast_variable_retrieve(cfg, "general", "emailsubject")))
|
||||||
|
@@ -30,7 +30,8 @@ maxlogins=3
|
|||||||
;externnotify=/usr/bin/myapp
|
;externnotify=/usr/bin/myapp
|
||||||
; For the directory, you can override the intro file if you want
|
; For the directory, you can override the intro file if you want
|
||||||
;directoryintro=dir-intro
|
;directoryintro=dir-intro
|
||||||
|
; The character set for voicemail messages can be specified here
|
||||||
|
;charset=ISO-8859-1
|
||||||
; Skip the "[PBX]:" string from the message title
|
; Skip the "[PBX]:" string from the message title
|
||||||
;pbxskip=yes
|
;pbxskip=yes
|
||||||
; Change the From: string
|
; Change the From: string
|
||||||
|
Reference in New Issue
Block a user