08-30-2017, 11:23 AM
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 .
Then you could simply query the db for the value, and send that with the function values so line 121:
could change to:
then you could do this around line 138:
<pre></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!
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();
}
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!