teste mal port 25 und füge noch die Zeile
fields.sendtls := True
dazwischen (vor dem .send auf jeden Fall)
das habe ich im netz gefunden(
https://www.tachytelic.net/2018/12/email-vbscript-vba-office-365/):
- The account that you use must have at least an Exchange Online license.
- You will only be able to send from addresses that account has send as permission for or an alias of that account.
- It would probably be a good idea to use an account dedicated for sending SMTP because the password is being stored in clear text.
- Your Firewall or your ISPs Firewall may block outbound port 25.
- I’ve left the code for TLS in-place above but commented out, in case anyone else wants to have a play with it.