PHP Mail not working.

If you're a new user of AppGini, feel free to ask general usage questions, or look for answers here.
Post Reply
mqley
Veteran Member
Posts: 70
Joined: 2020-07-19 13:25
Contact:

PHP Mail not working.

Post by mqley » 2021-12-21 20:58

It seems since updating to latest version of Appgini, the mail function doesn't work for new signups and authorisations. I also tried sending an email to all users from the Admin area and get this: "Could not instantiate mail function." for each user.

Where would I look to find the problem?
Best Wishes,

Mark

mqley
Veteran Member
Posts: 70
Joined: 2020-07-19 13:25
Contact:

Re: PHP Mail not working.

Post by mqley » 2021-12-22 18:15

Spoken to my host. PHP mailer should work, so suspect something has gone wrong in the coding. Localhost used to work sending emails for this app but doesn't any longer either. A bit stumped...
Best Wishes,

Mark

mqley
Veteran Member
Posts: 70
Joined: 2020-07-19 13:25
Contact:

Re: PHP Mail not working.

Post by mqley » 2021-12-22 18:17

Attached shows my settings. Not touched - so default.
Attachments
Screenshot 2021-12-22 at 17.06.18.png
Screenshot 2021-12-22 at 17.06.18.png (82.16 KiB) Viewed 2411 times
Best Wishes,

Mark

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1807
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: PHP Mail not working.

Post by jsetzer » 2021-12-22 19:59

There was a debug option for sending mails, but I do not remember if it was available for sendmail or only for SMTP.

Maybe it helps: a while ago I have written an article about configuring and testing sending mails via AppGini using SMTP:
https://appgini.bizzworxx.de/appgini/st ... ing-mails/

That article also contains a few tips for debugging.
Kind regards,
<js />

My AppGini Blog:
https://appgini.bizzworxx.de/blog

You can help us helping you:
Please always put code fragments inside [code]...[/code] blocks for better readability

AppGini 24.10 Revision 1579 + all AppGini Helper tools

mqley
Veteran Member
Posts: 70
Joined: 2020-07-19 13:25
Contact:

Re: PHP Mail not working.

Post by mqley » 2021-12-24 06:09

Thanks jsetzer, SMTP works fine. Not sure why the php sendmail default doesn't work on the new build. I've had no problem in the past on the host. We was running 8.1 php version. Hosting support suggested trying 7.1 php which we tried but it didn't fix. SMTP seems the way to go at present.

Thanks for helping out.
Best Wishes,

Mark

selectsteel
Posts: 26
Joined: 2013-09-23 14:14

Re: PHP Mail not working.

Post by selectsteel » 2022-09-09 14:53

I just went though a lot of trouble to get mail to work in my environment. We use office 365/Microsoft 365 and I wanted to relay mail with that.
Make sure the user email your using to send email had Authenticated SMTP enabled in MS 365 admin center under the user, mail, Manage email apps.
Also had to create App Password for that user.
https://github.com/Huachao/azure-conten ... sswords.md
Smtp Server is: smtp.office365.com
SMTP encryption: TLS
SMTP port: 587
set the user name and use the APP Password you created not the one you would login with.

Post Reply