Sending emails from IPTV is not working
Problem: You set up your email, but you are not receiving IPTV order notifications.
Objective: Ensure that email order notifications are properly sent from the IPTV system.
Steps:
Connect to the server:
Access the server via SSH.Verify your email address:
Ensure your email is correctly configured in the right file. The file path is:
/var/www/portal_base/application/etc/profiles/default.ini
Check and update your email under the appropriate section:
profiles.default.email.default.always.0 = "sonja@nevron.eu"
And the section to send orders from the TV screen further to the other systems:
profiles.default.usepms = true
Check SMTP settings:
Confirm that SMTP settings are correctly configured. By default, Google's SMTP is set. If you're using your own SMTP, ensure it's accurately inserted in the following file:
Path: /var/www/portal_base/application/etc/resources.ini
File content line 150:
; ------------------------------------------------------------------------------
; Send email application parameters (will automatically use encryption if available by SMTP server)
;
; Example:
; 1. Execute: cd /var/www/portal/tools/send_email
; 2. Execute: ./send_email smtp_ip="smtp.gmail.com" smtp_user="send@nevron.si" smtp_password="ChannelCapture123" from_email="no-reply@nevron.si" from_name="My name" to_emails="sonja@nevron.si" subject="Test email" message="Testing IPTV emails."
; ------------------------------------------------------------------------------
iptv.email.host = "smtp.gmail.com"
iptv.email.username = "send@nevron.si"
iptv.email.password = "ChannelCapture123"
iptv.email.default_sender.email = "no-reply@nevron.si"
iptv.email.default_sender.name = "IPTV Service" ;Notice: Can be overridden with profile ini file.
;iptv.email.port = 465
;iptv.email.port_isEncrypted = true
;iptv.email.debug = true
;iptv.email.timeout = 20
;iptv.email.disable_encryption = true;
Info: All libraries related to the SMTP are in that folder, maybe check if they have executable rights: /var/www/portal/tools/send_email
Testing email sending
Option 1: Test via TV screen
Place an order for a movie or a catalog item directly on the TV interface.
Wait for approximately 3 minutes.
Check your inbox to see if the email has been received.
Option 2: Test via SSH terminal
Connect to the server via SSH.
Navigate to the folder where the SMTP configuration is located:
cd /var/www/portal/tools/send_email
Execute the email command, filling in all necessary SMTP details. This will allow you to test the email functionality and identify any errors. Below are 3 example commands using custom SMTP configurations.
If an error occurs, the terminal will display it, helping you troubleshoot the issue.
Own SMTP:
./send_email smtp_ip="172.11.5.44" smtp_user="iptvinfo@cityhotel.com" smtp_password="iptv@123" from_email="iptvinfo@cityhotel.com" from_name="IPTV Service" to_emails="sonja@nevron.si,iptvinfo@cityhotel.com " subject="Test email" message="Test content" debug
Default SMTP:
./send_email smtp_ip="smtp.gmail.com" smtp_user="send@nevron.si" smtp_password="ChannelCapture123" from_email="no-reply@nevron.si" from_name="My name" to_emails="sonja@nevron.si" subject="Test email" message="Testing IPTV emails"
Own SMTP:
./send_email smtp_ip="mail.sma.com" smtp_user="bmrgroup@sma.com" smtp_password="bmrsma" from_email="bmrgroup@sma.com" from_name="SMAIT Hotel" to_emails="sonja@nevron.si, aism@sma.com " subject="Test IPTV email" message="Testing IPTV emails”
Result in error:
Open the necessary firewall port or temporarily disable the firewall for testing purposes. This will help determine if the recipient's side is rejecting the email due to network restrictions.
Solution:
Testing both methods ensures that emails are being sent and received correctly, and any errors can be diagnosed and resolved through the terminal.