fix post on sendmail
This commit is contained in:
@@ -77,17 +77,21 @@ Content-Type: audio/wav`;
|
|||||||
var attachments = [];
|
var attachments = [];
|
||||||
|
|
||||||
|
|
||||||
|
if (message_snapshot_data) {
|
||||||
if (typeof message_snapshot_data == "object") {
|
if (typeof message_snapshot_data == "object") {
|
||||||
attachments.push({ 'Content-Type': 'image/jpeg', data: new Buffer.from(message_snapshot_data).toString('base64') });
|
attachments.push({ 'Content-Type': 'image/jpeg', data: new Buffer.from(message_snapshot_data).toString('base64') });
|
||||||
} else {
|
} else {
|
||||||
attachments.push({ 'Content-Type': 'image/jpeg', data: message_snapshot_data });
|
attachments.push({ 'Content-Type': 'image/jpeg', data: message_snapshot_data });
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (message_voicemail_data) {
|
||||||
if (typeof message_voicemail_data == "object") {
|
if (typeof message_voicemail_data == "object") {
|
||||||
attachments.push({ 'Content-Type': 'audio/wav', data: new Buffer.from(message_voicemail_data).toString('base64') });
|
attachments.push({ 'Content-Type': 'audio/wav', data: new Buffer.from(message_voicemail_data).toString('base64') });
|
||||||
} else {
|
} else {
|
||||||
attachments.push({ 'Content-Type': 'audio/wav', data: new message_voicemail_data });
|
attachments.push({ 'Content-Type': 'audio/wav', data: new message_voicemail_data });
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var messagereturn = ssid_sessions[socket.ssid].mailstore.sendMessageToAddr(from_addr, to_addr, msg_body, msg_subject, userdisplayname, to_name, signature, attachments);
|
var messagereturn = ssid_sessions[socket.ssid].mailstore.sendMessageToAddr(from_addr, to_addr, msg_body, msg_subject, userdisplayname, to_name, signature, attachments);
|
||||||
if (messagereturn !== true) {
|
if (messagereturn !== true) {
|
||||||
|
|||||||
Reference in New Issue
Block a user