PHP Mail

Most Web-Server offer an email function. But offen the desired sender Email is not configured on the Web Server. K8 Web Kit supports the following 2 email systems:
- email by the Web server
- email by PHPMailer and an external email server
Use cases
- gbSendContact()
- gbsendActivation()
- gbSendPwd()
Basic Configuration
masterdata/_init.php
The default domain_emailmode is set to "1: email by PHPmailer". Please fill out your email configuration in the _init.php.
If the domain_emailmode is set to "0: email by server": please look to your Server Email Configuration and check the configuration.
The default domain_testemail can be used for several user as test. Please regard that "Send Password" is not working well in this case.
domain_email allows to configure:
- activate, Activation email
- sendPwd, Send password email
For both:
- subject
- content
can be declared. The content supports HTML-emails.
The template can be used for further necessary emails.
PHPMailer
Configuration
masterdata/_init.php
The default domain_emailmode is set to "1: PHPMailer". Please continue with the configuration for your email server. For example for a google email server it is important to configure an App-Password for third party access (description of App Password configuration).
More information to:
<projectpath>/_init.json
This is the same definitiion written in JSON format.
Send email
JavaScript
domain_emailrights
- 0: no emails
- 1: to logged in user only (default)
- 2: logged in to every one
- 3: role: 32
- 4: own email configuration (future)
Parameters:
- to
- cc
- bcc
- subject
- message
- content
PHP
If you want to use PHPMailer for own emails even by your customer, you can declare PHPMailer like this and transfer the customer mail server access data.