dataDesk BLOG

Welcome to the blog of Mr.G


Blog 31: background_+_css_grandient.md | (Open) | (Share)

▲ Previous | Next ▼

/Dev/Design

(Last modified: March 26 2025 10:48:17)

background + css grandient


:root {
  --font: "Inter", sans-serif;
  --body-color: #637381;
  --heading-color: #212b36;

  --body-bg-color: #ffffff;
  --body-bg-secondary-color: #d6e4ff;
  --body-bg-gradient: linear-gradient(90deg, var(--body-bg-color), var(--body-bg-secondary-color)); 

  --about-bg-color: #ffffff;
  --about-bg-secondary-color: #d6e4ff;
  --about-bg-gradient: linear-gradient(180deg, var(--body-bg-color), var(--body-bg-secondary-color)); 

  --primary-color: #3056d3; 
  --secondary-color: #591e8a;
  --primary-gradient: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  --white: #ffffff;
}

🎯 Here's a quick angle reference:

  • 0deg: top → bottom
  • 90deg: left → right
  • 180deg: bottom → top
  • 270deg: right → left
  • 135deg: top-left → bottom-right ✅ (what you're using)

💡 If you want left → right:

Use to right or 90deg:

--body-bg-gradient: linear-gradient(to right, var(--body-bg-color), var(--body-bg-secondary-color));

or

--body-bg-gradient: linear-gradient(90deg, var(--body-bg-color), var(--body-bg-secondary-color));



Blog 32: Screenshot_2025-03-20-09-40-36.jpg | (Open) | (Share)

▲ Previous | Next ▼

/PicNotes

(Last modified: March 22 2025 09:50:06)
Screenshot_2025-03-20-09-40-36
Image
Shared by © dataDesk



Blog 33: orny_Adams.md | (Open) | (Share)

▲ Previous | Next ▼

/Videos

(Last modified: March 09 2025 20:43:11)

orny Adams

thumbnail



Blog 34: markdown-cheat-sheet.md | (Open) | (Share)

▲ Previous | Next ▼

/Dev/Code/helpful

(Last modified: March 21 2025 09:07:14)

Markdown Cheat Sheet

Thanks for visiting The Markdown Guide!

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

![alt text](https://www.markdownguide.org/assets/images/tux.png)

## 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^



Blog 35: phpmailer.md | (Open) | (Share)

▲ Previous

/Dev/HowTo

Last modified: March 19 2025 17:43:31

phpmailer


composer require phpmailer/phpmailer

<?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:

  1. Log in to your DNS provider (where you manage your domain settings).

  2. 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).
  3. 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.

Steps to Set Up DKIM:


Who I am

"Just me, myself, and I, exploring the universe of unknownment, embracing the mystery of what lies beyond, one star at a time."

Share this page on Facebook | X.com | Reddit

Page Content

  • Image background + css grandient
    Published: 2025-04-02
    Read
  • Image Screenshot 2025-03-20-09-40-36
    Published: 2025-03-29
    Read
  • Image orny Adams
    Published: 2025-03-29
    Read
  • Image markdown-cheat-sheet
    Published: 2025-03-21
    Read
  • Image phpmailer
    Published: 2025-03-20
    Read

Tags

WebDev New York London AI NORWAY DIY Ideas Life Family News Clothing Invest Sports Health