The mail() function in PHP needs a program that implements sendmail,
since it delegates the actual mail sending part to it. I assume you'd
just want SMTP, then msmtp provides a sendmail implementation that
works with PHP without being an entire mail server in of itself. I
think others might have packaged things like Dovecot if that's not
enough. You can grab them from repositories like QSECOFR. They need
configuration so they know where to send mail.

Shameless self-promotion: I work at Seiden Group and we offer a
commercially-supported version of community PHP. Among the things it
includes, there's a sendmail program (msmtp) packaged plus
documentation and expert guidance on how to use it.
https://www.seidengroup.com/communityplus-php-for-ibm-i/


On Wed, 2021-01-06 at 15:36 +0000, Hopkins, Matt wrote:
Good morning….

I have the open source PHP installed on my development box and have
successfully implemented SimpleSamlPhp that gets me logged into a
clients web portal. I am trying to add some error handling that will
send an email when something goes wrong. I have in my php.ini file
the SMTP, sendmail_from, and smtp_port set. Everything seems to work
fine, except I don’t get the email. I get an entry in the email log
that an email was sent, but in the error log I get:

sh: -t:  not found

I have searched the web but nothing specific to the IBMi comes up.
The one thing that seems to come up most for other platforms is to
add a sendmail_path entry in the php.ini file. I have searched for a
file called sendmail in the /QOpenSys area but none was found, so I
don’t know what to put in the sendmail_path setting.

Does anyone have an idea on what I need to do to fix it?

Thanks,

Matt Hopkins




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2021 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.