diff --git a/examples/code_generator.phps b/examples/code_generator.phps
index d9a4da0a..9faf7393 100644
--- a/examples/code_generator.phps
+++ b/examples/code_generator.phps
@@ -91,10 +91,8 @@ try {
$example_code .= "\n\$mail->Host = \"" . $_POST['smtp_server'] . "\";";
$example_code .= "\n\$mail->Port = \"" . $_POST['smtp_port'] . "\";";
$example_code .= "\n\$mail->SMTPSecure = \"" . strtolower($_POST['smtp_secure']) . "\";";
- $example_code .= "\n\$mail->SMTPAuth = " . (array_key_exists(
- 'smtp_authenticate',
- $_POST
- ) ? 'true' : 'false') . ";";
+ $example_code .= "\n\$mail->SMTPAuth = " .
+ (array_key_exists('smtp_authenticate', $_POST) ? 'true' : 'false') . ";";
if (array_key_exists('smtp_authenticate', $_POST)) {
$example_code .= "\n\$mail->Username = \"" . $_POST['authenticate_username'] . "\";";
$example_code .= "\n\$mail->Password = \"" . $_POST['authenticate_password'] . "\";";
diff --git a/examples/simple_contact_form.phps b/examples/simple_contact_form.phps
index f422edcc..c5db5592 100644
--- a/examples/simple_contact_form.phps
+++ b/examples/simple_contact_form.phps
@@ -12,6 +12,7 @@ require '../vendor/autoload.php';
if (array_key_exists('to', $_POST)) {
$err = false;
$msg = '';
+ $email = '';
//Apply some basic validation and filtering to the subject
if (array_key_exists('subject', $_POST)) {
$subject = substr(strip_tags($_POST['subject']), 0, 255);
@@ -55,9 +56,9 @@ if (array_key_exists('to', $_POST)) {
$mail->Host = 'localhost';
$mail->Port = 2500;
$mail->CharSet = 'utf-8';
- //It's important not to use the submitter's address as the form address as it's forgery,
- //which will cause our messages to fail SPF checks
- //Use an address in your own domain here
+ //It's important not to use the submitter's address as the from address as it's forgery,
+ //which will cause your messages to fail SPF checks.
+ //Use an address in your own domain as the from address, put the submitter's address in a reply-to
$mail->setFrom('contact@example.com', (empty($name)? 'Contact form': $name));
$mail->addAddress($to);
$mail->addReplyTo($email, $name);
diff --git a/examples/smime_signed_mail.phps b/examples/smime_signed_mail.phps
index 059d24f4..50ef0fa1 100644
--- a/examples/smime_signed_mail.phps
+++ b/examples/smime_signed_mail.phps
@@ -6,7 +6,8 @@
*
*
* STEP 1 - Creating a certificate:
- * You can either use a self signed certificate, pay for a signed one or use free alternatives such as StartSSL/Comodo etc.
+ * You can either use a self-signed certificate, pay for a signed one,
+ * or use free alternatives such as StartSSL, Comodo etc.
* Check out this link for more providers: http://kb.mozillazine.org/Getting_an_SMIME_certificate
* In this example I am using Comodo.
* The form is directly available via https://secure.comodo.com/products/frontpage?area=SecureEmailCertificate
diff --git a/get_oauth_token.php b/get_oauth_token.php
index 7a0ea9b5..40c46aa5 100644
--- a/get_oauth_token.php
+++ b/get_oauth_token.php
@@ -51,6 +51,7 @@ if (!isset($_GET['code']) && !isset($_GET['provider'])) {
Yahoo
Microsoft/Outlook/Hotmail/Live/Office365