Use PEAR:mail with smtp

SYSTEM INFORMATION
OS type and version Debian 11
Webmin version 2.021
Virtualmin version 7.7
Related packages pear

I have this:

PEAR Version: 1.10.12
PHP Version: 7.4.33
Zend Engine Version: 3.4.0

Can I use pear to send email with smtp to an extern mailserver?

I guess this comes under the heading “Can I install any old pile of !!*!! on my server” to which the answer is “it is your server, put on it what you want - but it is up to you to maintain it” – because I don’t think Virtualmin has anything to do with it … I could be wrong of course :wink:

Hello,

Yes, you could. This is what Pear::Mail is for (it also supports SMTP backend). You can install it using Webmin, e.g.:

Please be polite! Also, Pear::Mail is still supported. The latest release 1.5.0 was on 2022-11-29.

Apparently Very wrong - it seems but not on my version, apparently (which is probably why I have never seen them!)

Check unused modules.

I also don’t have it. Nor in Un-used Modules.
How to get it in Debian 11 ?

No not there either (even after a Refresh Modules)
It is not that I want it, or even need it - just that I don’t like being hoisted by my own petard for not knowing something that is obviously there to some. or at least @Ilia

This is a good question @Joe, where webmin-php-pear module is in Debian/Ubuntu repos?

Although, if you really need it right now, you could simply clone it from our GitHub PHP-PEAR repo, e.g.:

cd /usr/share/webmin
git clone https://github.com/virtualmin/php-pear.git
ln -s /usr/bin/perl /usr/local/bin/perl

Then enable it in Webmin Users / username / Available Modules page. When done, go to the Tools ⇾ PHP Pear Modules module config and set the path to pear to /usr/bin/pear. It will work then.

Pear modules only seem to appear on my ‘pro’ servers and not gpl maybe I was lucky on the day I installed vmin :wink:

You could well be right there. Perhaps an upgrade is long overdue anyway.
It would be nice to have that confirmed as the cause.
At the moment there is nothing standing out in the Pro version (install scripts list) that look interesting to me (as they are mostly PHP addons) and no user of mine uses PHP.

as I am a PHP coder … I need every aspect of php on my staging server & as a final test the same on my production server. I don’t use pear on my projects, hence how I didn’t miss it on my gpl server … until now :wink:

The PEAR module is not Pro only. I don’t know why it’s not in all the repos. It’s supposed to be everywhere. I’ll look into it when I get some free time.

1 Like

I followed your instructions but in Tools there is still no PHP Pear Modules.
Nor in Un-used Modules.

Afterwards, you need to enable it in Webmin ⇾ Webmin Users page, e.g.:

1 Like

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