Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

Cloudron Forum

Apps | Demo | Docs | Install

Cannot send mail from LAMP app

Scheduled Pinned Locked Moved LAMP
8 Posts 3 Posters 395 Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • andres.moyaA Offline
    andres.moyaA Offline
    andres.moya
    wrote on last edited by
    #1

    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.

    girishG 1 Reply Last reply
    0
  • girishG Do not disturb
    girishG Do not disturb
    girish Staff
    replied to andres.moya on last edited by
    #2

    @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 and CLOUDRON_MAIL_SMTP_PASSWORD env variables must be used.

    1 Reply Last reply
    0
  • girishG girish moved this topic from Support on
  • andres.moyaA Offline
    andres.moyaA Offline
    andres.moya
    wrote on last edited by
    #3

    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.

    1 Reply Last reply
    0
  • girishG Do not disturb
    girishG Do not disturb
    girish Staff
    wrote on last edited by
    #4

    I have updated the docs to use PHPMailer - https://docs.cloudron.io/apps/lamp/#email . PHPMailer supports SMTP authentication.

    holloschH 1 Reply Last reply
    1
  • holloschH Offline
    holloschH Offline
    hollosch
    replied to girish on last edited by
    #5

    @girish Hi, how/where to configure the phpmailer after install?

    girishG 1 Reply Last reply
    0
  • girishG Do not disturb
    girishG Do not disturb
    girish Staff
    replied to hollosch on last edited by
    #6

    @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?

    holloschH 2 Replies Last reply
    1
  • holloschH Offline
    holloschH Offline
    hollosch
    replied to girish on last edited by
    #7

    @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?

    1 Reply Last reply
    0
  • holloschH Offline
    holloschH Offline
    hollosch
    replied to girish on last edited by
    #8

    @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

    1 Reply Last reply
    0

  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks