first readme
Dieser Commit ist enthalten in:
Ursprung
1cb56eb383
Commit
b2790d31e4
1 geänderte Dateien mit 61 neuen und 1 gelöschten Zeilen
62
README.md
62
README.md
|
@ -1 +1,61 @@
|
||||||
test
|
|
||||||
|
# PHPMailer Plugin for CONTENIDO
|
||||||
|
|
||||||
|
This plugin will add PHPMailer to your CONTENIDO CMS. You need at last version 4.10.1
|
||||||
|
|
||||||
|
|
||||||
|
You may use PHPMailer in your module, plugin or other project within CONTENIDO using
|
||||||
|
the following sample code, which can be found in README file of the PHPMailer lib,
|
||||||
|
which you can get on [github](https://github.com/PHPMailer/PHPMailer).
|
||||||
|
|
||||||
|
```php
|
||||||
|
$mailer = new PHPMailer(true);
|
||||||
|
|
||||||
|
try {
|
||||||
|
//Server settings
|
||||||
|
$mailer->SMTPDebug = SMTP::DEBUG_SERVER; //Enable verbose debug output
|
||||||
|
$mailer->isSMTP(); //Send using SMTP
|
||||||
|
$mailer->Host = 'smtp.example.com'; //Set the SMTP server to send through
|
||||||
|
$mailer->SMTPAuth = true; //Enable SMTP authentication
|
||||||
|
$mailer->Username = 'user@example.com'; //SMTP username
|
||||||
|
$mailer->Password = 'secret'; //SMTP password
|
||||||
|
$mailer->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS; //Enable implicit TLS encryption
|
||||||
|
$mailer->Port = 465; //TCP port to connect to; use 587 if you have set `SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS`
|
||||||
|
|
||||||
|
//Recipients
|
||||||
|
$mailer->setFrom('from@example.com', 'Mailer');
|
||||||
|
$mailer->addAddress('joe@example.net', 'Joe User'); //Add a recipient
|
||||||
|
$mailer->addAddress('ellen@example.com'); //Name is optional
|
||||||
|
$mailer->addReplyTo('info@example.com', 'Information');
|
||||||
|
$mailer->addCC('cc@example.com');
|
||||||
|
$mailer->addBCC('bcc@example.com');
|
||||||
|
|
||||||
|
//Attachments
|
||||||
|
$mail->addAttachment('/var/tmp/file.tar.gz'); //Add attachments
|
||||||
|
$mail->addAttachment('/tmp/image.jpg', 'new.jpg'); //Optional name
|
||||||
|
|
||||||
|
//Content
|
||||||
|
$mail->isHTML(true); //Set email format to HTML
|
||||||
|
$mail->Subject = 'Here is the subject';
|
||||||
|
$mail->Body = 'This is the HTML message body <b>in bold!</b>';
|
||||||
|
$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
|
||||||
|
|
||||||
|
$mail->send();
|
||||||
|
echo 'Message has been sent';
|
||||||
|
} catch (Exception $e) {
|
||||||
|
echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}";
|
||||||
|
}
|
||||||
|
```
|
||||||
|
---
|
||||||
|
|
||||||
|
## History
|
||||||
|
|
||||||
|
#### 1.0.0
|
||||||
|
|
||||||
|
- first official release of PHPMailer plugin
|
||||||
|
|
||||||
|
#### 0.0.1
|
||||||
|
|
||||||
|
- initial version of PHPMailer plugin (intern)
|
||||||
|
|
||||||
|
|
||||||
|
|
Laden …
In neuem Issue referenzieren