This Markdown cheat sheet provides a quick overview of all the Markdown syntax elements. It can’t cover every edge case, so if you need more information about any of these elements, refer to the reference guides for basic syntax and extended syntax.
## Basic Syntax
These are the elements outlined in John Gruber’s original design document. All Markdown applications support these elements.
### Heading
# H1
## H2
### H3
### Bold
**bold text**
### Italic
*italicized text*
### Blockquote
> blockquote
### Ordered List
1. First item
2. Second item
3. Third item
### Unordered List
- First item
- Second item
- Third item
### Horizontal Rule
---
### Link
[Markdown Guide](https://www.markdownguide.org)
### Image

## Extended Syntax
These elements extend the basic syntax by adding additional features. Not all Markdown applications support these elements.
### Table
| Syntax | Description |
| ----------- | ----------- |
| Header | Title |
| Paragraph | Text |
### Fenced Code Block
use ``` code ```
### Footnote
Here's a sentence with a footnote. [^1]
[^1]: This is the footnote.
### Heading ID
### My Great Heading {#custom-id}
### Definition List
term
: definition
### Strikethrough
~~The world is flat.~~
### Task List
- [x] Write the press release
- [ ] Update the website
- [ ] Contact the media
### Emoji
That is so funny! :joy:
(See also [Copying and Pasting Emoji](https://www.markdownguide.org/extended-syntax/#copying-and-pasting-emoji))
### Highlight
I need to highlight these ==very important words==.
### Subscript
H~2~O
### Superscript
X^2^
<?php
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
require 'vendor/autoload.php'; // Load PHPMailer via Composer
function sendAuctionEmail($recipientEmail, $recipientName, $subject, $message) {
$mail = new PHPMailer(true);
try {
// SMTP settings
$mail->isSMTP();
$mail->Host = 'smtp.gmail.com'; // SMTP server (use your provider if not Gmail)
//$mail->Host = 'myappz.com';
//$mail->Hostname = 'mail.myappz.com';
$mail->SMTPAuth = true;
$mail->Username = 'your-email@gmail.com'; // Your email address
$mail->Password = 'your-email-password'; // Use an "App Password" if using Gmail
//$mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS;
//$mail->Port = 587;
$mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS;
$mail->Port = 465;
// $mail->SMTPDebug = 2; // Use 2 for verbose output
// $mail->Debugoutput = function ($str, $level) {
// file_put_contents('phpmailer_debug.log', "[$level] $str\n", FILE_APPEND);
// };
// Email headers
$mail->setFrom('your-email@gmail.com', 'Auction Alerts'); // Sender email & name
$mail->addAddress($recipientEmail, $recipientName); // Recipient email & name
$mail->Subject = $subject;
$mail->Body = $message;
$mail->isHTML(true); // Allows HTML content (optional)
// Send email
$mail->send();
return "📧 Email sent successfully to $recipientEmail";
} catch (Exception $e) {
return "❌ Email failed: " . $mail->ErrorInfo;
}
}
require 'sendmail.php';
// Example: Send an email when 15 minutes remain
$recipientEmail = "user@example.com";
$recipientName = "John Doe";
$subject = "Auction Alert: 15 Minutes Left!";
$message = "Hello $recipientName, this is a reminder that your auction is ending in 15 minutes.";
echo sendAuctionEmail($recipientEmail, $recipientName, $subject, $message);
Gmail (and other email providers) require proper email authentication to prevent spam and to verify that emails are coming from legitimate sources. This typically involves SPF (Sender Policy Framework) and DKIM (DomainKeys Identified Mail).
Here’s how to set up SPF and DKIM to make your email deliverable to Gmail and other providers:
1️⃣ SPF (Sender Policy Framework)
SPF is used to verify the sending mail server is authorized to send emails on behalf of your domain.
Steps to Set Up SPF:
Log in to your DNS provider (where you manage your domain settings).
Add a TXT record for SPF:
Host:@ (or your domain name)
Type:TXT
Value:
v=spf1 a mx ip4:12.123.123.12 ~all
Explanation:
v=spf1 → Specifies it's an SPF record.
a → Accepts mail from the IP address of the A record.
mx → Accepts mail from any server listed in the MX records for the domain.
ip4:12.123.123.12 → Allows mail from the IP 12.123.123.12 (your server IP).
~all → Soft fail (emails from unauthorized servers are marked but not rejected).
Save and apply the record. It may take a few minutes for DNS propagation.
2️⃣ DKIM (DomainKeys Identified Mail)
DKIM adds a digital signature to the email, allowing the receiving mail server (like Gmail) to verify that the email was sent by an authorized server and that it wasn’t tampered with during transit.
Add it to GitLab (Profile → Preferences → SSH Keys).
! [rejected] main -> main (fetch first)
error: failed to push some refs to 'digts.de:firstgroup/user-handling-2.0.git'
Solution
This error occurs because the remote GitLab repository already has some commits that your local repository doesn’t have. To fix it, follow these steps:
1️⃣ Fetch and Merge Remote Changes
First, pull the latest changes from the remote repository before pushing your local changes:
git pull --rebase origin main
If you get a merge conflict, Git will show the affected files. You’ll need to manually resolve them and commit.
2️⃣ Force Push (If Needed)
If you are sure your local version is correct and you want to overwrite the remote changes, you can force push:
git push -f origin main
⚠ Warning: This will overwrite the remote repository with your local version, erasing any remote changes.
3️⃣ Alternative: Create a Backup Branch
If you’re unsure about force pushing, create a backup before pulling: