Closed instantflorian closed 6 years ago
To "Issues when Mail settings = PHP" I also had clients wich websites were (or still are) hosted on Goneo or Strato – two hosts from many who denies the sending of mails with an (host-)unknown sender address. In this cases i just configured the mail address in the WB(CE) advanced options and/or in the (mp)form module to a host-known address and never had issues with non sending mail again. So i would assume that these settings are "pipelined" to the underlying PHPMailer base – isn't it?
mpForm uses wbmailer() or WbMailer(), an interface of the underlying WB or WBCE.
For a long time it was sufficient to provide the correct credentials and the SMTP servers happily have accepted all emails over this connection (even when the traffic was unencrypted).
A few years ago, hosters have started to enforce TLS connections and they have also started filtering the email traffic for emails with acceptable headers. Many web-hosters and also some of the large email providers don't allow to fake the From:-field anymore. Best is the username for the authentication at the smtp server is the From:-address. At least, the domain-part of the From: Address should be hosted at the provider of the smtp server (maybe not within the same account, which relaxes the constraint a bit).
For the phpmailer class: maybe there are a few more things to set up for the connection. Server-port, and authentication method, like used in email clients, would be good. However, I didn't llook into the phpmailer library, recently. I'm not sure if it supports different authentication methods at all.
I think the way the class.wbmailer.php works and how the PHPMailer is includen / initialized has to be reviewed. Issues when Mail settings = SMTP: Allthough I'm quite sure I entered the right credentials, sending mails via SMTP fails (no connection to server). Probably it's an issue with SSL and/or the port 25, which is used by default. So we might need more configuration options for SMTP Mail besinde of server, username and passwort, e.g. which port and which kind of SSL should be used. Unfortunately, I have no possibility to get detailled debug information.
Issues when Mail settings = PHP: In certain circumstances it is necessary to set the internal sender address to a certain value and initialize the mail() command with the parameter -f existingadress@currentserver.com. This can currently only be done by modifying core files, what is a less good sulution since it will be lost and forgotten when updating the core. So we need to check if the default from address, which is entered in the WBCE backend, is really used at all variables in the phpmailer class and maybe add a field to replace the default mail parameters by individual ones. See https://wiki.goneo.de/phpmailer for example.