0

I installed KSWEB Pro v3.986 on my Samsung smartphone including PHP Lighttpd and MSMTP. I would like to send emails using an external email provider like gmx, gmail, directbox. But after I run the following PHP website, nothing happens. The MSMTP log is still empty. What is important in the configuration.

<?php
$from_address = "myuser@directbox.com";
$message = "This is a test";
$bool = mail("my_other_user@gmail.com", "Testmail", $message, "From: MyName <$from_address>");
echo $bool;
?>

Here is my MSMTP configuration:

defaults
port 465
# account default
account directbox

## host of smtp server, example: smtp.directbox.com
## !edit this!
#host 0.0.0.0
host smtp.directbox.com

auth on

## Use transport Layer Security (TLS) - Secure Socket Layer (SSL). 
tls on
tls_starttls off
tls_certcheck off

## smtp login
## !edit this!
user myuser@directbox.com

## smtp password
## !edit this!
password myPassword

## Set the envelope-from address. This adress must be equal to
## your email which you are use above.
## !edit this
from myuser@directbox.com

logfile /data/user/0/ru.kslabs.ksweb/components/log/msmtp/msmtp.log
domac
  • 21
  • 2
  • Does this answer your question? [PHP mail function doesn't complete sending of e-mail](https://stackoverflow.com/questions/24644436/php-mail-function-doesnt-complete-sending-of-e-mail) – ADyson Sep 07 '22 at 10:33
  • @ADyson: Thanks for this tip. I have worked through all the points except for the paragraph "Use a different mailer". Under KSWEB it is not possible for me to install something like that. Unfortunately I could not solve the problem until now. Are there any other tips related specifically to KSWEB in combination with the PHP function "mail" and MSMTP on Android? By the way, my device is not rooted. – domac Sep 11 '22 at 21:09
  • PhpMailer is just some .php files, you can bundle them with the rest of your php application...doesn't need "installing" as such. That way you can then either just build your mail in a nicer more reliable way, and/or set it to use a 3rd party smtp server and thus avoid potential issues with your local one – ADyson Sep 11 '22 at 22:12
  • Okay, thanks. I found a workaround and that was easier to create. I send the data to my web server that includes a mailserver and send it with this. – domac Sep 14 '22 at 11:38
  • I use [rainloo](https://www.rainloop.net) on Android KSWEB _apache server_, no need **MSMTP** – XCoder Jun 18 '23 at 17:28

0 Answers0