The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Failed to send email (admin if sent)
#19
My suggestion would be to store a database value in the email table of sendmail or smtp, and provide a drop-down select menu. The default could be sendmail, and if you select SMTP, then the other fields appear from a hidden
Code:
<div>
.

Then you could simply query the db for the value, and send that with the function values so line 121:

Code:
function email($to,$subject,$body,$attachment=false){

could change to:

Code:
function email($to,$subject,$body,$attachment=false,$mta){

then you could do this around line 138:

<pre>
Code:
if ($mta == "smtp") {
  $mail->isSMTP();
}
</pre>


This way it's user friendly for those admins that know no code.

I can see why you wouldn't have that may complaints though because a lot of hosting providers keep sendmail() on their hosting servers (like GoDaddy) where you wouldn't need SMTP. I uninstall sendmail from my hosting servers and force admins to use SMTP through their email via postfix so I can see when I might have a runaway spam site, and I can easily disable the violating email account to stop the email.

Sorry, I just saw where you asked @mudmin specifically on this. But hope the input helps!
  Reply


Messages In This Thread
Failed to send email (admin if sent) - by GePraxa - 09-12-2016, 10:58 PM
Failed to send email (admin if sent) - by mudmin - 09-12-2016, 11:50 PM
Failed to send email (admin if sent) - by brian - 09-12-2016, 11:53 PM
Failed to send email (admin if sent) - by GePraxa - 09-13-2016, 02:37 AM
Failed to send email (admin if sent) - by brian - 09-13-2016, 11:35 AM
Failed to send email (admin if sent) - by GePraxa - 09-14-2016, 06:01 PM
Failed to send email (admin if sent) - by plb - 09-19-2016, 09:00 AM
Failed to send email (admin if sent) - by mudmin - 10-15-2016, 10:52 PM
Failed to send email (admin if sent) - by mudmin - 10-16-2016, 11:26 AM
Failed to send email (admin if sent) - by Brandin - 08-29-2017, 06:45 PM
Failed to send email (admin if sent) - by Brandin - 08-30-2017, 11:05 AM
Failed to send email (admin if sent) - by corey_hitt@multiverse.software - 08-30-2017, 11:23 AM
Failed to send email (admin if sent) - by Brandin - 08-30-2017, 11:25 AM

Forum Jump:


Users browsing this thread: 4 Guest(s)