This commit is contained in:
Harald G. Mueller 2023-02-13 20:33:13 +01:00
parent 0b0462ed9f
commit de39f38f91
78 changed files with 2161 additions and 0 deletions

View File

@ -0,0 +1,35 @@

# Method to write an email with the logfile as attachement
#--------------------------------------------------------------------------------------------------
function sendmail() {
$toMail = "harald.mueller@bluewin.ch"
$attachment = "C:\Users\Harald\OneDrive\Technik\mails\data.pdf"
$SMTPServer = "smtp.gmail.com"
$SMTPPort = "587"
$Username = "invoice.autointerleasing@gmail.com"
# password of the mail account
$Password = "invoice77autointerleasing" | ConvertTo-SecureString -AsPlainText -Force
$subject = "Powi mail"
$body = "Logfile has been modified. Please review attached document $entry."
$message = New-Object System.Net.Mail.MailMessage
$message.subject = $subject
$message.body = $body
$message.to.add($toMail)
$message.from = $username
$message.attachments.add($attachment)
$smtp = New-Object System.Net.Mail.SmtpClient($SMTPServer, $SMTPPort);
$smtp.EnableSSL = $true
$smtp.Credentials = New-Object System.Net.NetworkCredential($Username, $Password);
$smtp.send($message)
}
## (Get-Credential).password | ConvertFrom-SecureString > mailpasswort.txt
## $pw = Get-Content .\mailpasswort.txt | ConvertTo-SecureString
## $cred = New-Object System.Management.Automation.PSCredential "MailUser", $pw
## Send-MailMessage -Credential $cred -to "harald.mueller@bluewin.ch" -from "PowerShell <ps@fabrikam.de>" -Subject "Test" -body "Test für Send-MailMessage"
sendmail

View File

@ -0,0 +1,83 @@
## (Get-Credential).password | ConvertFrom-SecureString > mailpasswort.txt
## $pw = Get-Content .\mailpasswort.txt | ConvertTo-SecureString
## $cred = New-Object System.Management.Automation.PSCredential "MailUser", $pw
## Send-MailMessage -Credential $cred -to "harald.mueller@bluewin.ch" -from "PowerShell <ps@fabrikam.de>" -Subject "Test" -body "Test für Send-MailMessage"
$body =
"IHRE RECHNUNG VON AUTO-INTERLEASING AG
VOTRE FACTURE D'AUTO-INTERLEASING SA
Sehr geehrte Damen und Herren
Madame, Monsieur,
Mit dieser Mail erhalten Sie die aktuelle Rechnung von Auto-Interleasing als PDF. Die Papierrechnung erhalten Sie wie gewohnt mit der Post.
Par ce présent courrier, nous vous transmettons la facture d'Auto-Interleasing en version PDF. La facture papier vous parviendra comme d'habitude par courrier postal.
Wir bitten Sie, den offenen Betrag unter Einhaltung der Zahlungsfrist an die auf dem beigefügten Einzahlungsschein vermerkten Kontonummer zu überweisen.
Nous vous prions de verser le montant conformément au délai de paiement mentionné sur le bulletin de versement joint.
Einzahlung für:
Versement pour:
Auto-Interleasing AG
St. Jakob-Strasse 72
4132 Muttenz
IBAN: CH21 0023 3233 1012 5122 0
Freundliche Grüsse,
Avec nos cordiales salutations,
Auto-Interleasing AG
St. Jakob-Strasse 72
4132 Muttenz
+41 61 319 32 32
info@auto-interleasing.ch
www.auto-interleasing.ch
Für die elektronische Rechnung sind Sie mit obiger E-Mail-Adresse bei uns registriert.
Pour l'envoi des factures par voie électronique, vous êtes inscrits avec l'adresse e-mail mentionnée ci-dessus
Allfällige Änderungen Ihrer E-Mail-Adresse teilen Sie bitte unverzüglich Ihrem Kundenbetreuer mit.
Pour toute modification de votre adresse e-mail, nous vous prions de contacter votre gestionnaire.
Bitte beachten Sie, dass Antworten auf diese E-Mail-Adresse leider nicht beantwortet werden können.
Im Falle von Rückfragen oder Unklarheiten wenden Sie sich bitte an Ihren zuständigen Kundenbetreuer.
Vielen Dank!
Veuillez prendre note qu'aucune correspondance ne peut être échangée par le biais de cette adresse e-mail.
Pour toutes questions ou informations, nous vous prions de contacter votre gestionnaire. Merci beaucoup !
"
$SMTPHost = "smtp.gmail.com"
$SMTPPort = "587"
$Username = "invoice.autointerleasing@gmail.com"
$Password = "invoice77autointerleasing" | ConvertTo-SecureString -AsPlainText -Force
$subjectFixtext = "RECHNUNG/FACTURE"
$smtp = New-Object System.Net.Mail.SmtpClient($SMTPHost, $SMTPPort);
$smtp.EnableSSL = $true
$smtp.Credentials = New-Object System.Net.NetworkCredential($Username, $Password);
$message = New-Object System.Net.Mail.MailMessage
$message.from = $username
$message.body = $body
# Method to write an email with the logfile as attachement
function sendmail ([String] $toMail, [String] $attachment, [String] $RgNr) {
# $toMail = "harald.mueller@bluewin.ch"
# $attachment = "C:\Users\Harald\OneDrive\Technik\mails\data.pdf"
$message.to.add("$toMail")
$message.attachments.add("$attachment")
$message.subject = $subjectFixtext + " Nr. " + $RgNr
echo $toMail
echo $attachment
# $smtp.send($message)
}
sendmail ("harald.mueller@bluewin.ch", "C:\Users\Harald\OneDrive\Technik\mails\data.pdf", "1")

View File

@ -0,0 +1,25 @@
# Aufgabe "Lieferung ins Zahlungssystem"
**Files**
<https://haraldmueller.ch/schoolerinvoices/out> (Passwort auf html-Seite: tbz)
<br><https://haraldmueller.ch/schoolerinvoices/in> (Passwort: tbz)
FTP-Server: ftp.haraldmueller.ch
Benutzer: schoolerinvoices
Passwort: Berufsschule8005!
<br>
**Verarbeitung starten:**
<https://coinditorei.com/zahlungssystem> (Passwort: tbz)
**Files**
<https://coinditorei.com/zahlungssystem/in> (Passwort: tbz)
<br><https://coinditorei.com/zahlungssystem/out> (Passwort: tbz)
FTP-Server: ftp.coinditorei.com
Benutzer: zahlungssystem
Passwort: Berufsschule8005!

View File

@ -0,0 +1 @@
<?xml version="1.0" encoding="utf-8"?><Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><Header><From>IPEC</From><To>Coop Mineralöl AG</To><UseCase>GetProcessProtocol</UseCase><SessionID /><Version>1.1</Version><Status>0</Status></Header><Body><BillerID>41101000000240844</BillerID><DeliveryDate date="20150106"><NumberBills>1</NumberBills><OK_Signed>1</OK_Signed><OK_Result><Signed>1</Signed><Bill><TransactionID>729122x000005xEBPxCOOPx01022015x000093</TransactionID></Bill></OK_Result><NOK_Result><NotSigned>0</NotSigned></NOK_Result></DeliveryDate><RejectedBills><NumberBills>1</NumberBills><Bill><TransactionID>729122x000005xEBPxCOOPx01022015x000093</TransactionID><EBillAccountID>41100000077682784</EBillAccountID><ESRReference>911754000000012218285587591</ESRReference><TotalAmount>10.80</TotalAmount><ReasonCode>25</ReasonCode><ReasonText>eBill Rejected by Customer / Payer</ReasonText><Date>2015-02-27</Date></Bill></RejectedBills></Body></Envelope>

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,149 @@
<XML-FSCM-INVOICE-2003A>
<INTERCHANGE>
<IC-SENDER>
<Pid>41010000001234567</Pid>
</IC-SENDER>
<IC-RECEIVER>
<Pid>41010106799303734</Pid>
</IC-RECEIVER>
<IR-Ref />
</INTERCHANGE>
<INVOICE>
<HEADER>
<FUNCTION-FLAGS>
<Confirmation-Flag />
<Canellation-Flag />
</FUNCTION-FLAGS>
<MESSAGE-REFERENCE>
<REFERENCE-DATE>
<Reference-No>eindeutige Rechnungsnummer</Reference-No>
<Date>20200731</Date>
</REFERENCE-DATE>
</MESSAGE-REFERENCE>
<PRINT-DATE>
<Date>20200731</Date>
</PRINT-DATE>
<REFERENCE>
<INVOICE-REFERENCE>
<REFERENCE-DATE>
<Reference-No>eindeutigeRechnungsnummer</Reference-No>
<Date>20200731</Date>
</REFERENCE-DATE>
</INVOICE-REFERENCE>
<ORDER>
<REFERENCE-DATE>
<Reference-No>eindeutigeNummer3</Reference-No>
<Date>20200731</Date>
</REFERENCE-DATE>
</ORDER>
<REMINDER Which="MAH">
<REFERENCE-DATE>
<Reference-No>eindeutigeNummer4</Reference-No>
<Date>20200731</Date>
</REFERENCE-DATE>
</REMINDER>
<OTHER-REFERENCE Type="ADE|CR|CT">
<REFERENCE-DATE>
<Reference-No>eindeutigeNummer4</Reference-No>
<Date>20200731</Date>
</REFERENCE-DATE>
</OTHER-REFERENCE>
</REFERENCE>
<BILLER>
<Tax-No>CHE-111.222.333 MWST</Tax-No>
<Doc-Reference Type="ESR-NEU|ESR-ALT|IPI"></Doc-Reference>
<PARTY-ID>
<Pid>41010000001234567</Pid>
</PARTY-ID>
<NAME-ADDRESS Format="COM">
<NAME>
<Line-35></Line-35>
<Line-35></Line-35>
<Line-35></Line-35>
<Line-35></Line-35>
<Line-35></Line-35>
</NAME>
<STREET>
<Line-35></Line-35>
<Line-35></Line-35>
<Line-35></Line-35>
</STREET>
<City></City>
<State></State>
<Zip></Zip>
<Country></Country>
</NAME-ADDRESS>
<BANK-INFO>
<Acct-No></Acct-No>
<Acct-Name></Acct-Name>
<BankId Type="BCNr-nat|BCNr-int|Bic|Esr|Iban" Country="CH">001996</BankId>
</BANK-INFO>
</BILLER>
<PAYER>
<PARTY-ID>
<Pid>41010106799303734</Pid>
</PARTY-ID>
<NAME-ADDRESS Format="COM">
<NAME>
<Line-35>Vorname Nachname</Line-35>
<Line-35>Musterstrasse 12</Line-35>
<Line-35>3052 Zollikofen</Line-35>
<Line-35></Line-35>
<Line-35></Line-35>
</NAME>
<STREET>
<Line-35></Line-35>
<Line-35></Line-35>
<Line-35></Line-35>
</STREET>
<City></City>
<State></State>
<Zip></Zip>
<Country></Country>
</NAME-ADDRESS>
</PAYER>
</HEADER>
<LINE-ITEM />
<SUMMARY>
<INVOICE-AMOUNT>
<Amount>0000021095</Amount>
</INVOICE-AMOUNT>
<VAT-AMOUNT>
<Amount></Amount>
</VAT-AMOUNT>
<DEPOSIT-AMOUNT>
<Amount></Amount>
<REFERENCE-DATE>
<Reference-No>eindeutigeNummer4</Reference-No>
<Date>20200731</Date>
</REFERENCE-DATE>
</DEPOSIT-AMOUNT>
<EXTENDED-AMOUNT Type="79">
<Amount></Amount>
</EXTENDED-AMOUNT>
<TAX>
<TAX-BASIS>
<Amount></Amount>
</TAX-BASIS>
<Rate Categorie="S|E">0</Rate>
<Amount></Amount>
</TAX>
<PAYMENT-TERMS>
<BASIC Payment-Type="ESR|ESP|NPY" Terms-Type="1|5">
<TERMS>
<Payment-Period Type="CD|M" On-Or-After="1|3" Reference-Day="5|29">30</Payment-Period>
<Date>20130831</Date>
</TERMS>
</BASIC>
<DISCOUNT Terms-Type="22">
<Discount-Percentage>2.0</Discount-Percentage>
<TERMS>
<Payment-Period Type="CD|M" On-Or-After="1|3" Reference-Day="5|29">30</Payment-Period>
<Date>20130831</Date>
</TERMS>
<Back-Pack-Container Encode="Base64|Hex">xxyy</Back-Pack-Container>
</DISCOUNT>
</PAYMENT-TERMS>
</SUMMARY>
</INVOICE>
</XML-FSCM-INVOICE-2003A>

View File

@ -0,0 +1,5 @@
Rechnung_21003;Auftrag_A003;Zürich;21.03.2021;10:22:54;ZahlungszielInTagen_30
Herkunft;41010000001234567;K821;Adam Adler;Bahnhofstrasse 1;8000 Zuerich;CHE-111.222.333 MWST;harald.mueller@tbz.ch
Endkunde;41301000000012497;Autoleasing AG;Gewerbestrasse 100;5000 Aarau
RechnPos;1;Einrichten E-Mailclients;6;25.00;150.00;MWST_0.00%
RechnPos;2;Konfig & Schulung Scanningcenter;1;1200.00;1200.00;MWST_0.00%

View File

@ -0,0 +1,65 @@
Adam Adler
Bahnhofstrasse 1
8000 Zuerich
CHE-111.222.333 MWST
Uster, den 31.07.2020 Autoleasing AG
Gewerbestrasse 100
5000 Aarau
Kundennummer: K821
Auftragsnummer: A003
Rechnung Nr 21003
-----------------------
1 Einrichten E-Mailclients 6 25.00 CHF 150.00 0.00%
2 Konfig & Schulung Scanningcenter 1 1200.00 CHF 1200.00 0.00%
-----------
Total CHF 1350.00
MWST CHF 0.00
Zahlungsziel ohne Abzug 30 Tage (30.08.2020)
Einzahlungsschein
1350 . 00 1350 . 00 Autoleasing AG
Gewerbestrasse 100
0 00000 00000 00000 5000 Aarau
Autoleasing AG
Gewerbestrasse 100
5000 Aarau

View File

@ -0,0 +1,149 @@
<XML-FSCM-INVOICE-2003A>
<INTERCHANGE>
<IC-SENDER>
<Pid>41010000001234567</Pid>
</IC-SENDER>
<IC-RECEIVER>
<Pid>41301000000012497</Pid>
</IC-RECEIVER>
<IR-Ref />
</INTERCHANGE>
<INVOICE>
<HEADER>
<FUNCTION-FLAGS>
<Confirmation-Flag />
<Canellation-Flag />
</FUNCTION-FLAGS>
<MESSAGE-REFERENCE>
<REFERENCE-DATE>
<Reference-No>202007164522001</Reference-No>
<Date>20200731</Date>
</REFERENCE-DATE>
</MESSAGE-REFERENCE>
<PRINT-DATE>
<Date>20200731</Date>
</PRINT-DATE>
<REFERENCE>
<INVOICE-REFERENCE>
<REFERENCE-DATE>
<Reference-No>21003</Reference-No>
<Date>20200731</Date>
</REFERENCE-DATE>
</INVOICE-REFERENCE>
<ORDER>
<REFERENCE-DATE>
<Reference-No>A003</Reference-No>
<Date>20200731</Date>
</REFERENCE-DATE>
</ORDER>
<REMINDER Which="MAH">
<REFERENCE-DATE>
<Reference-No></Reference-No>
<Date></Date>
</REFERENCE-DATE>
</REMINDER>
<OTHER-REFERENCE Type="ADE">
<REFERENCE-DATE>
<Reference-No>12345678</Reference-No>
<Date>20200731</Date>
</REFERENCE-DATE>
</OTHER-REFERENCE>
</REFERENCE>
<BILLER>
<Tax-No>CHE-111.222.333 MWST</Tax-No>
<Doc-Reference Type="ESR-ALT "></Doc-Reference>
<PARTY-ID>
<Pid>41010000001234567</Pid>
</PARTY-ID>
<NAME-ADDRESS Format="COM">
<NAME>
<Line-35>Adam Adler</Line-35>
<Line-35>Bahnhofstrasse 1</Line-35>
<Line-35>8000 Zürich</Line-35>
<Line-35></Line-35>
<Line-35></Line-35>
</NAME>
<STREET>
<Line-35></Line-35>
<Line-35></Line-35>
<Line-35></Line-35>
</STREET>
<City></City>
<State></State>
<Zip></Zip>
<Country></Country>
</NAME-ADDRESS>
<BANK-INFO>
<Acct-No></Acct-No>
<Acct-Name></Acct-Name>
<BankId Type="BCNr-nat" Country="CH">001996</BankId>
</BANK-INFO>
</BILLER>
<PAYER>
<PARTY-ID>
<Pid>41301000000012497</Pid>
</PARTY-ID>
<NAME-ADDRESS Format="COM">
<NAME>
<Line-35>Autoleasing AG</Line-35>
<Line-35>Gewerbestrasse 100</Line-35>
<Line-35>5000 Aarau</Line-35>
<Line-35></Line-35>
<Line-35></Line-35>
</NAME>
<STREET>
<Line-35></Line-35>
<Line-35></Line-35>
<Line-35></Line-35>
</STREET>
<City></City>
<State></State>
<Zip></Zip>
<Country></Country>
</NAME-ADDRESS>
</PAYER>
</HEADER>
<LINE-ITEM />
<SUMMARY>
<INVOICE-AMOUNT>
<Amount>0000135000</Amount>
</INVOICE-AMOUNT>
<VAT-AMOUNT>
<Amount></Amount>
</VAT-AMOUNT>
<DEPOSIT-AMOUNT>
<Amount></Amount>
<REFERENCE-DATE>
<Reference-No></Reference-No>
<Date></Date>
</REFERENCE-DATE>
</DEPOSIT-AMOUNT>
<EXTENDED-AMOUNT Type="79">
<Amount></Amount>
</EXTENDED-AMOUNT>
<TAX>
<TAX-BASIS>
<Amount></Amount>
</TAX-BASIS>
<Rate Categorie="S">0</Rate>
<Amount></Amount>
</TAX>
<PAYMENT-TERMS>
<BASIC Payment-Type="ESR" Terms-Type="1">
<TERMS>
<Payment-Period Type="M" On-Or-After="1" Reference-Day="31">30</Payment-Period>
<Date>20200831</Date>
</TERMS>
</BASIC>
<DISCOUNT Terms-Type="22">
<Discount-Percentage>0.0</Discount-Percentage>
<TERMS>
<Payment-Period Type="M" On-Or-After="1" Reference-Day="31"></Payment-Period>
<Date></Date>
</TERMS>
<Back-Pack-Container Encode="Base64"> </Back-Pack-Container>
</DISCOUNT>
</PAYMENT-TERMS>
</SUMMARY>
</INVOICE>
</XML-FSCM-INVOICE-2003A>

View File

@ -0,0 +1,3 @@
20200109-103503 K123_54321_invoice.xml verarbeitet -- RechnungsNr:54321/Kundennummer:K123/TotalCHF:1350.00/
20200109-103503 K123_54321_invoice.txt verarbeitet -- FirmaX;HaraldMueller;Rainstrasse27;8610Uster;CHE-999.888.777MWST;Kundennummer:K123;RechnungNr54321;TotalCHF1350.00;ZahlungszielohneAbzug30Tage(20.02.2012)