-
I'm trying to configure a php application installed into a LAMP app in cloudron, to send emails.
I'm following instructions here and have typed the "cloudronmail" function as stated there. But it does not send any email. I have added traces to see the commands executed and the responses, and there are (i've edited out the personal information):
helo <some identifier> > 220 my.example.com ESMTP Haraka/2.8.28 ready mail from: myapp.app@example.com > 250 my.example.com Hello <some identifier>.cloudron [172.18.16.4]Haraka is at your service. rcpt to: some.email@hotmail.com > 250 sender <myapp.app@example.com> OK data > 550 I cannot deliver mail for <some.email@hotmail.com> To: some.email@hotmail.com (...) > 503 RCPT required first quit > 500 Unrecognized command
The address "some.email@hotmail.com" is a valid address of one of the cloudron users (although i think this should not be necessary).
Do you have any clue? Don't understand why it "cannot deliver mail" for this address. Thanks.
-
@andres-moya the example in the docs seems wrong because it doesn't send use SMTP auth at all. Let me try to fix up the example tomorrow. The
CLOUDRON_MAIL_SMTP_USERNAME
andCLOUDRON_MAIL_SMTP_PASSWORD
env variables must be used. -
-
Ok, finally I managed to solve my immediate problem in a different way. But it still be useful to be able to send emails from the PHP app. I cannot try this now, but I'll try again next time we need to do it.
-
I have updated the docs to use PHPMailer - https://docs.cloudron.io/apps/lamp/#email . PHPMailer supports SMTP authentication.
-
@hollosch you have to configure it in the code. https://docs.cloudron.io/apps/lamp/#email has an example. I assume you are using a custom app that you developed?
-
@girish said in Cannot send mail from LAMP app:
@hollosch you have to configure it in the code. https://docs.cloudron.io/apps/lamp/#email has an example. I assume you are using a custom app that you developed?
ah, that means I have to adjust the configuration in the PHP script I'm using, doesn't it?
-
@girish said in Cannot send mail from LAMP app:
@hollosch you have to configure it in the code. https://docs.cloudron.io/apps/lamp/#email has an example. I assume you are using a custom app that you developed?
I'm using https://www.php-guestbook.de/?langu=en