Voicemails are not getting emailed

Status
Not open for further replies.

NVGcom

New Member
Apr 29, 2020
25
1
3
48
Hi,

Remove the email_from as this column does not exist in the Database.
Change smtp_from to no-reply@domain.tld.
I use this to display the same.
Also, if you use Office365 set the smtp_crypto_method to true.
I do not have anything in the smtp_hostname field and I have FusionPBX with Office365, Gmail and for one customer cPanel e-mail and all work.
The email queue is enabled by default for new installs, the fax queue is not.
 

Nedo

Member
Jun 22, 2020
59
3
8
40
I'm sorry I still don't understand, line 45 is empty i have:


if (email_from == nil or email_from == "") then
email_from = settings:get('email', 'smtp_from', 'text');
from_name = settings:get('email', 'smtp_from_name', 'text');
end

line 45 is here

if (email_from == nil or email_from == "") then
email_from = address;
elseif (from_name ~= nil and from_name ~= "") then
email_from = from_name .. "<" .. email_from .. ">";
end
 

NVGcom

New Member
Apr 29, 2020
25
1
3
48
In the Default settings - email. Avoid messing with config files as much as you can. If you are not a Blue member, you'll have a hard time fixing things.
Use in Default Settings smtp_from field instead of email_from then go into Status - Email Logs and send a test e-mail and see what shows.
Of course, delete the email_from and reload once completed.
Just tested it from a brand new Install and it works as expected.
 

mrbnet

New Member
Nov 1, 2022
10
0
1
41
EDIT: I implemented this as a work around until I can figure out what the actual issue is.

1. Edit the following file:
Code:
/usr/share/freeswitch/scripts/resources/functions/send_mail.lua
2. Before the following code
Code:
if (email_from == nil or email_from =="") then
(about line 43) add line with the following:
Code:
email_from=noreply@yourdomain-name-here.com
 

socialboh

Member
Jan 11, 2021
30
2
8
The exact change is:

nano /usr/share/freeswitch/scripts/resources/functions/send_mail.lua

after this block:

if (email_from == nil or email_from == "") then
email_from = settings:get('email', 'smtp_from', 'text');
from_name = settings:get('email', 'smtp_from_name', 'text');
end


put your from mail:

email_from='voicemail@yourdomain.org'

I don't think this is the best way to solve the issue but works. I think there is a problem with database query and FusionPBX beacause:

email_from = settings:get('email', 'smtp_from', 'text');
from_name = settings:get('email', 'smtp_from_name', 'text');


return nil and my table contain the right values.

Thank you and Regards
 

socialboh

Member
Jan 11, 2021
30
2
8
I don't know if is a coincidence but reinstalling FusionPBX Yesterday changing:

nano /usr/src/fusionpbx-install.sh/debian/resources/config.sh

database_password=random


with:

database_password=mypassword

resolve the issue without modyfing /usr/share/freeswitch/scripts/resources/functions/send_mail.lua, in my case.
 
Status
Not open for further replies.