From adb5567f04314a29d5985198f201788252a6273b Mon Sep 17 00:00:00 2001 From: markster Date: Thu, 2 Oct 2003 06:42:39 +0000 Subject: Increment message id number in e-mail git-svn-id: http://svn.digium.com/svn/asterisk/trunk@1601 f38db490-d61c-443f-a65b-d21fe96a405b --- apps/app_voicemail2.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'apps') diff --git a/apps/app_voicemail2.c b/apps/app_voicemail2.c index 3ae8a8744..9a02a1dde 100755 --- a/apps/app_voicemail2.c +++ b/apps/app_voicemail2.c @@ -154,7 +154,7 @@ static int maxlogins; static char *emailbody = NULL; static int pbxskip = 0; -static char fromstring[40]; +static char fromstring[100]; static char emailtitle[100]; STANDARD_LOCAL_USER; @@ -504,9 +504,9 @@ static int sendmail(char *srcemail, char *email, char *name, int msgnum, char *m } else if (pbxskip) - fprintf(p, "Subject: New message %d in mailbox %s\n", msgnum, mailbox); + fprintf(p, "Subject: New message %d in mailbox %s\n", msgnum + 1, mailbox); else - fprintf(p, "Subject: [PBX]: New message %d in mailbox %s\n", msgnum, mailbox); + fprintf(p, "Subject: [PBX]: New message %d in mailbox %s\n", msgnum + 1, mailbox); fprintf(p, "Message-ID: \n", msgnum, mailbox, getpid(), host); fprintf(p, "MIME-Version: 1.0\n"); if (attach_user_voicemail) { @@ -544,11 +544,11 @@ static int sendmail(char *srcemail, char *email, char *name, int msgnum, char *m "in mailbox %s from %s, on %s so you might\n" "want to check it when you get a chance. Thanks!\n\n\t\t\t\t--Asterisk\n\n", name, - dur, msgnum, mailbox, (callerid ? callerid : "an unknown caller"), date); + dur, msgnum + 1, mailbox, (callerid ? callerid : "an unknown caller"), date); } if (attach_user_voicemail) { fprintf(p, "--%s\n", bound); - fprintf(p, "Content-Type: audio/x-wav; name=\"msg%04d.%s\"\n", msgnum, format); + fprintf(p, "Content-Type: audio/x-wav; name=\"msg%04d.%s\"\n", msgnum + 1, format); fprintf(p, "Content-Transfer-Encoding: BASE64\n"); fprintf(p, "Content-Description: Voicemail sound attachment.\n"); fprintf(p, "Content-Disposition: attachment; filename=\"msg%04d.%s\"\n\n", msgnum, format); -- cgit v1.2.3