mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-02-20 09:56:32 +00:00
Voicemail-to-Email: Add custom headers containing domain_uuid, domain_name, call_uuid and email_type. Send email using Domain smtp settings, if defined under Default Settings.
This commit is contained in:
@@ -42,12 +42,13 @@
|
||||
script_name = argv[0];
|
||||
to = argv[1];
|
||||
from = argv[2];
|
||||
subject = argv[3];
|
||||
body = argv[4];
|
||||
file = argv[5];
|
||||
delete = argv[6];
|
||||
--convert_cmd = argv[7];
|
||||
--convert_ext = argv[8];
|
||||
headers = argv[3];
|
||||
subject = argv[4];
|
||||
body = argv[5];
|
||||
file = argv[6];
|
||||
delete = argv[7];
|
||||
--convert_cmd = argv[8];
|
||||
--convert_ext = argv[9];
|
||||
|
||||
--replace the ' with a single quote
|
||||
body = body:gsub("'", "'");
|
||||
@@ -59,21 +60,21 @@
|
||||
if (file == nil) then
|
||||
freeswitch.email("",
|
||||
"",
|
||||
"To: "..to.."\nFrom: "..from.."\nSubject: "..subject,
|
||||
"To: "..to.."\nFrom: "..from.."\nX-Headers: "..headers.."\nSubject: "..subject,
|
||||
body
|
||||
);
|
||||
else
|
||||
if (convert_cmd == nil) then
|
||||
freeswitch.email("",
|
||||
"",
|
||||
"To: "..to.."\nFrom: "..from.."\nSubject: "..subject,
|
||||
"To: "..to.."\nFrom: "..from.."\nX-Headers: "..headers.."\nSubject: "..subject,
|
||||
body,
|
||||
file
|
||||
);
|
||||
else
|
||||
freeswitch.email("",
|
||||
"",
|
||||
"To: "..to.."\nFrom: "..from.."\nSubject: "..subject,
|
||||
"To: "..to.."\nFrom: "..from.."\nX-Headers: "..headers.."\nSubject: "..subject,
|
||||
body,
|
||||
file,
|
||||
convert_cmd,
|
||||
|
||||
Reference in New Issue
Block a user