You wrote:
> I will try to install it.
Why only _try_? On Linux, spec. on Ubuntu, it is a child's play. Did you check the Ubuntu documentation I have linked to?
> I hope I can be able to run it in the same web server I have moodle installed.
That is what I mean, when I say "to send mails through the local SMTP service".
>But my original question is about sending emails through PHP built-in feature that moodle provides.
Could you provide your sources?
> I don´t know why it doesn´t work. Any ideas?
Perhaps because there is no such _it_. For details see Ken's answer.
Also read the section on spam problem in sending mail from a random home box.
Visvanath Ratnaweera
Posts made by Visvanath Ratnaweera
Obviously you don't have a SMTP service running. The first is to decide whether you want to send mails through the local SMTP service (default) or you would take an external SMTP service, you mentioned Gmail in you first post. Read, for example, "EMail: php vs SMTP" https://moodle.org/mod/forum/discuss.php?d=321390.
Only if you decide for local SMTP install a SMTP server of your choice: Sendmail, Exim, Postfix, ... Linux has it all!
With Postfix, for example, you might need only:
- https://help.ubuntu.com/community/Postfix#Installation and
- the first 10 points of https://help.ubuntu.com/community/Postfix#Configuration.
Only if you decide for local SMTP install a SMTP server of your choice: Sendmail, Exim, Postfix, ... Linux has it all!
With Postfix, for example, you might need only:
- https://help.ubuntu.com/community/Postfix#Installation and
- the first 10 points of https://help.ubuntu.com/community/Postfix#Configuration.
In the case of default local SMTP ("blank all fields in config tab") do you have a SMTP service running in the computer? If so, a telnet session to port 25 should go like this:
$ telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 mybuntu.localdomain ESMTP Postfix (Debian/GNU)
EHLO foo.bar.com
250-mybuntu.localdomain
[...]
mail from: nobody@example.com
250 2.1.0 Ok
rcpt to: atest@mail.addres
250 2.1.5 Ok
data
354 End data with .
Hi there!
.
250 2.0.0 Ok: queued as 008523800A7
quit
221 2.0.0 Bye
Connection closed by foreign host.
Try generating developer level https://docs.moodle.org/28/en/Debugging output.
Also, go through the documentation in the Hardware and performance forum https://moodle.org/mod/forum/view.php?id=596. "Add a new discussion topic" https://moodle.org/mod/forum/post.php?forum=94 for complete information.
Also, go through the documentation in the Hardware and performance forum https://moodle.org/mod/forum/view.php?id=596. "Add a new discussion topic" https://moodle.org/mod/forum/post.php?forum=94 for complete information.