mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2024-12-24 13:40:29 +01:00
Linked emailbackup email accounts to company wide settings in firmendaten
-> To do: clean up emailbackup accounts with smtp / imap settings
This commit is contained in:
parent
e8dea5a81b
commit
d59b7da9a2
@ -139,6 +139,7 @@ final class SystemMailer
|
||||
&& $account->getSmtpAuthType() !== EmailBackupAccount::AUTH_GMAIL
|
||||
)
|
||||
) {
|
||||
$mailerror_text = 'Authtype error.';
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -29734,7 +29734,7 @@ function ChargenMHDAuslagern($artikel, $menge, $lagerplatztyp, $lpid,$typ,$wert,
|
||||
|
||||
function GetSelectEmailMitName($selected="")
|
||||
{
|
||||
$own = $this->app->User->GetEmail();
|
||||
/* $own = $this->app->User->GetEmail();
|
||||
$name = $this->app->User->GetName();
|
||||
|
||||
$selected = str_replace(' <',' <',$selected);
|
||||
@ -29769,9 +29769,14 @@ function ChargenMHDAuslagern($artikel, $menge, $lagerplatztyp, $lpid,$typ,$wert,
|
||||
}
|
||||
|
||||
$email_addr = $this->app->DB->SelectArr("SELECT if(smtp_frommail!='',smtp_frommail,email) as email,smtp_fromname FROM emailbackup WHERE (smtp_frommail!='' OR email!='') AND (adresse<=0 OR adresse='".$this->app->User->GetAdresse()."') AND geloescht!=1 ORDER BY email");
|
||||
*/
|
||||
// Force only existing emailbackup accounts
|
||||
|
||||
$email_addr = $this->app->DB->SelectArr("SELECT email, angezeigtername FROM emailbackup WHERE email != '' AND (adresse<=0 OR adresse='".$this->app->User->GetAdresse()."') AND geloescht!=1 ORDER BY email");
|
||||
|
||||
foreach($email_addr AS $mail)
|
||||
{
|
||||
if($mail['smtp_fromname']!="") $emails[] = $mail['smtp_fromname']." <".$mail['email'].">";
|
||||
if($mail['angezeigtername']!="") $emails[] = $mail['angezeigtername']." <".$mail['email'].">";
|
||||
else $emails[] = $firmenname." <".$mail['email'].">";
|
||||
}
|
||||
|
||||
@ -29789,6 +29794,7 @@ function ChargenMHDAuslagern($artikel, $menge, $lagerplatztyp, $lpid,$typ,$wert,
|
||||
|
||||
function GetSelectEmail($selected="")
|
||||
{
|
||||
/*
|
||||
$own = $this->app->User->GetEmail();
|
||||
$email_addr= $this->Firmendaten("email");
|
||||
|
||||
@ -29804,16 +29810,28 @@ function ChargenMHDAuslagern($artikel, $menge, $lagerplatztyp, $lpid,$typ,$wert,
|
||||
$emails[] = $email_addr;
|
||||
|
||||
$email_addr = $this->app->DB->SelectArr("SELECT if(smtp_frommail!='',smtp_frommail,email) as email FROM emailbackup WHERE (smtp_frommail!='' OR email!='') AND (adresse<=0 OR adresse='".$this->app->User->GetAdresse()."') AND geloescht!=1 ORDER BY email");
|
||||
foreach($email_addr AS $mail)
|
||||
*/
|
||||
// Force only existing emailbackup accounts
|
||||
|
||||
$email_addr = $this->app->DB->SelectArr("SELECT email FROM emailbackup WHERE email != '' AND (adresse<=0 OR adresse='".$this->app->User->GetAdresse()."') AND geloescht!=1 ORDER BY email");
|
||||
|
||||
foreach($email_addr AS $mail) {
|
||||
$emails[] = $mail['email'];
|
||||
}
|
||||
|
||||
$emails = array_keys(array_flip($emails));
|
||||
|
||||
for($i=0;$i<(!empty($emails)?count($emails):0);$i++)
|
||||
{
|
||||
if($emails[$i]==$selected) $mark="selected"; else $mark="";
|
||||
if($emails[$i]==$selected) {
|
||||
$mark="selected";
|
||||
}
|
||||
else {
|
||||
$mark="";
|
||||
}
|
||||
$tpl .="<option value=\"{$emails[$i]}\" $mark>{$emails[$i]}</option>";
|
||||
}
|
||||
|
||||
return $tpl;
|
||||
}
|
||||
|
||||
|
@ -99,13 +99,6 @@
|
||||
document.forms[0].elements['footer[3][4]'].value = "";
|
||||
document.forms[0].elements['footer[3][5]'].value = "";
|
||||
|
||||
|
||||
document.forms[0].benutzername.value = "musterman";
|
||||
document.forms[0].passwort.value = "passwort";
|
||||
document.forms[0].host.value = "smtp.server.de";
|
||||
document.forms[0].port.value = "25";
|
||||
document.forms[0].ssl.checked = true;
|
||||
|
||||
document.forms[0].email.value = "info@server.de";
|
||||
document.forms[0].absendername.value = "Meine Firma";
|
||||
document.forms[0].signatur.value = "--\n"
|
||||
@ -663,19 +656,11 @@
|
||||
<div class="row-height">
|
||||
<div class="col-xs-12 col-md-12 col-md-height">
|
||||
<div class="inside inside-full-height">
|
||||
<fieldset id="fieldset-mailversand-einstellungen">
|
||||
<legend>{|Versand Einstellungen|}</legend>
|
||||
<fieldset>
|
||||
<legend>Standard Einstellung E-Mail (bei Versand von E-Mails)</legend>
|
||||
<table cellspacing="5" width="100%">
|
||||
<tr><td width="300">Benutzername (E-Mail): </td><td><input type="text" name="benutzername" size="40" value="[BENUTZERNAME]"></td></tr>
|
||||
<tr><td>Passwort: </td><td><input type="password" name="passwort" size="40" value="[PASSWORT]" AUTOCOMPLETE="off"></td></tr>
|
||||
<tr><td>Postausgangsserver: </td><td><input type="text" name="host" size="40" value="[HOST]"></td></tr>
|
||||
<tr><td>Port: </td><td><input type="text" name="port" size="4" value="[PORT]"></td></tr>
|
||||
<tr><td width="50">Verschlüsselung:</td><td><select name="mailssl"><option value="0">keine</option><option value="1" [TLS]>TLS</option><option value="2" [SSL]>SSL</option></select></td></tr>
|
||||
<tr><td>Testmail Empfänger: </td><td><input type="text" name="testmailempfaenger" size="40" value="[TESTMAILEMPFAENGER]"></td></tr>
|
||||
<tr><td width="50">Testmail:</td><td><input type="submit" name="submitFirmendaten" onclick="$('#firmendatenform').attr('action','#tabs-4');" value="Speichern"> <input type="button" value="Testmail senden" id="testmail-senden-button"> <i>Bitte erst speichern und dann senden!</i></td></tr>
|
||||
<tr><td width="50">PHP mail() verwenden (nur in Ausnahme!):</td><td><input type="checkbox" name="mailanstellesmtp" [MAILANSTELLESMTP]></td></tr>
|
||||
<tr><td width="50">Keine SMTP Authentifizierung:</td><td><input type="checkbox" name="noauth" [NOAUTH]></td></tr>
|
||||
<!--<tr><td align="center"></td><td><input type="button" name="testmail" value="Testmail schicken (zum Account Testen)"></td></tr>-->
|
||||
<tr><td width="50">Testmail:</td><td><input type="button" value="Testmail senden" id="testmail-senden-button"> <i>Bitte erst speichern und dann senden!</i></td></tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
@ -690,7 +675,9 @@
|
||||
<fieldset>
|
||||
<legend>Standard Einstellung E-Mail (bei Versand von E-Mails)</legend>
|
||||
<table cellspacing="5" width="100%">
|
||||
<tr><td width="300">E-Mailadresse:</td><td><input type="text" name="email" value="[EMAIL]" size="40"></td>
|
||||
<tr><td width="300">E-Mailadresse:</td><td><select name="email">
|
||||
[EMAIL]
|
||||
</select></td>
|
||||
<tr><td>Name des Absenders:</td><td><input type="text" name="absendername" value="[ABSENDERNAME]" size="40"></td>
|
||||
<tr><td>Standardsignatur:</td><td><textarea name="signatur" id="signatur" rows="15" cols="80">[SIGNATUR]</textarea></td>
|
||||
<tr><td>Standard Grußformel:</td><td><textarea name="mailgrussformel" id="mailgrussformel" rows="5" cols="80" data-lang="mailgrussformel">[MAILGRUSSFORMEL]</textarea> <i>Variable Absendername {MITARBEITER}</i></td>
|
||||
|
@ -1711,19 +1711,11 @@ class Firmendaten {
|
||||
$this->app->Tpl->Set('HINTERGRUNDBRIEFPAPIER2TEXT', "<a class=\"button\" href=\"index.php?module=firmendaten&action=briefpapier&cmd=briefpapier2\">PDF herunterladen</a>");
|
||||
}
|
||||
|
||||
//Versand E-Mail
|
||||
$this->app->Tpl->Set('BENUTZERNAME' , $data[0]['benutzername']);
|
||||
$this->app->Tpl->Set('PASSWORT' , $data[0]['passwort']);
|
||||
$this->app->Tpl->Set('HOST' , $data[0]['host']);
|
||||
$this->app->Tpl->Set('PORT' , $data[0]['port']);
|
||||
if($data[0]['mailssl']=="2")
|
||||
$this->app->Tpl->Set('SSL' , "selected");
|
||||
else if($data[0]['mailssl']=="1")
|
||||
$this->app->Tpl->Set('TLS' , "selected");
|
||||
|
||||
// Signatur
|
||||
$this->app->Tpl->Set('SIGNATUR' , base64_decode($data[0]['signatur']));
|
||||
$this->app->Tpl->Set('EMAIL' , $data[0]['email']);
|
||||
|
||||
$this->app->Tpl->Set('EMAIL', $this->app->erp->GetSelectEmail($data[0]['email']));
|
||||
|
||||
$this->app->Tpl->Set('ABSENDERNAME' , $data[0]['absendername']);
|
||||
$this->app->Tpl->Set('BCC1' , $data[0]['bcc1']);
|
||||
$this->app->Tpl->Set('BCC2' , $data[0]['bcc2']);
|
||||
|
Loading…
Reference in New Issue
Block a user