Problem with sending e-mail

I get this error in the log when I have enabled sending e-mail when SMS arrives.

L2 sendmail # end with error:it was not specified a valid From header

Does anyone know how to solve this problem?

I have tested both sendmail and postfix on the server hosting playSMS, with my own smtp-server which works with other systems but with playSMS I only get that error all the time.

Thanks in advance

First what smtp server did you used? Second check the smtp logs to identify the errors. it might a relay permission. Ensure your using same domainname defined in your SMTP server unless your using open smtp relays.

Nucs

Otherwise you missed configured you SMS to Email config , headups also in secure and non secure protocols.

Hi Nuctorial_Joe_Tai_Bu.
Hi all.
I installed the latest playSMS, on the server (centos 7.9) i have postfix installed with relay_host trough gmail.
Postfix alone while sending emails from cli (mail -s “SUBJECT” <destination_mail_address>) or by telnet to localhost tcp port 25 works perfectly, but playSMS can not send email trough it.
The postfix, and playSMS being on the same machine, does not need any authentication, ssl, or any special security measures, so everithing is clean as mountain fresh water …
I did some digging on issue, and as i observed, the problem is in

plugin/core/sendmail/lib/external/mimemessage/smtp_message.php

on line 131, so as i can deduce, the initialization of variable $headers is not ok…
But … unfortunately i am not a programmer … :frowning:

Forgot to mention, that the error mssages in playsms.log is:

192.168.0.1 smsgw.domain1.com:884 2020-11-16 21:09:37 PID5fb2ce71dcf8f - L2 sendmail # start from:sender@domain1.com to:destination@domain2.com subject:Password recovery
192.168.0.1 smsgw.domain1.com:884 2020-11-16 21:09:37 PID5fb2ce71dcf8f - L2 sendmail # end with error:it was not specified a valid From header
192.168.0.1 smsgw.domain1.com:884 2020-11-16 21:09:37 PID5fb2ce71dcf8f - L2 forgot # u:hans email:destination@domain2.com ip:192.168.0.1 error_string:[Fail to send email]

Hi,

I replaced old email libs on plugin sendmail with PHPMailer, I tested with local SMTP server sendmail on Ubuntu, mail received on destination (I use protonmail account for tests, I can’t send email to gmail without properly configure my smtp server)

Here is the changes:

Affected files on branch sendmail_update (https://github.com/antonraharja/playSMS/tree/sendmail_update):

	modified:   composer.json
	modified:   web/plugin/core/auth/templates/auth_forgot_email.html
	modified:   web/plugin/core/auth/templates/auth_register_email.html
	modified:   web/plugin/core/user/templates/user_add_email.html
	modified:   web/plugin/feature/sms_board/fn.php
	modified:   web/plugin/core/recvsms/fn.php
	modified:   web/plugin/core/sendmail/fn.php
	deleted:    web/plugin/core/sendmail/lib/external/index.html
	deleted:    web/plugin/core/sendmail/lib/external/mimemessage/email_message.php
	deleted:    web/plugin/core/sendmail/lib/external/mimemessage/sendmail_mail.php
	deleted:    web/plugin/core/sendmail/lib/external/mimemessage/sendmail_message.php
	deleted:    web/plugin/core/sendmail/lib/external/mimemessage/smtp/getmxrr.php
	deleted:    web/plugin/core/sendmail/lib/external/mimemessage/smtp/smtp.php
	deleted:    web/plugin/core/sendmail/lib/external/mimemessage/smtp/test_smtp.php
	deleted:    web/plugin/core/sendmail/lib/external/mimemessage/smtp_mail.php
	deleted:    web/plugin/core/sendmail/lib/external/mimemessage/smtp_message.php
	deleted:    web/plugin/core/sendmail/lib/index.html

With some more tests this branch will be merged in 1.4.3 and 1.4.4

anton

Hi Anton.

I installed 1.4.4-a1. Email sending works now, but … Thank you!

As of my first findings, subusers can not send messages, can not attach to them outgoing routes nor sender ID-s.

Janos.

Ok, but please create new topic for that.

anton

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.