Jump to content

Search the Community

Showing results for tags 'templates'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 1 result

  1. okay i dont know where to put this topic, if it needs to be moved then please do so, I have been creating a mass mailer with this class, <?php class SimpleMail { private $toAddress; private $CCAddress; private $BCCAddress; private $fromAddress; private $subject; private $sendText; private $textBody; private $sendHTML; private $HTMLBody; public function __construct() { $this->toAddress = ''; $this->CCAddress = ''; $this->BCCAddress = ''; $this->fromAddress = ''; $this->subject = ''; $this->sendText = false; $this->textBody = ''; $this->sendHTML = true; $this->HTMLBody = ''; } public function setToAddress($value) { $this->toAddress = $value; } public function setCCAddress($value) { $this->CCAddress = $value; } public function setBCCAddress($value) { $this->BCCAddress = $value; } public function setFromAddress($value) { $this->fromAddress = $value; } public function setSubject($value) { $this->subject = $value; } public function setSendText($value) { $this->sendText = $value; } public function setTextBody($value) { $this->sendText = false; $this->textBody = $value; } public function setSendHTML($value) { $this->sendHTML = $value; } public function setHTMLBody($value) { $this->sendHTML = true; $this->HTMLBody = $value; } public function send($to = null, $subject = null, $message = null, $headers = null) { $success = false; if (!is_null($to) && !is_null($subject) && !is_null($message)) { $success = mail($to, $subject, $message, $headers); return $success; } else { $headers = array(); if (!empty($this->fromAddress)) { $headers[] = 'From: ' . $this->fromAddress; } if (!empty($this->CCAddress)) { $headers[] = 'CC: ' . $this->CCAddress; } if (!empty($this->BCCAddress)) { $headers[] = 'BCC: ' . $this->BCCAddress; } if ($this->sendText && !$this->sendHTML) { $message = $this->textBody; } elseif (!$this->sendText && $this->sendHTML) { $headers[] = 'MIME-Version: 1.0'; $headers[] = 'Content-type: text/html; charset="iso-8859-1"'; $headers[] = 'Content-Transfer-Encoding: 7bit'; // $headers[] .= 'Content-Transfer-Encoding: quoted-printable'; $message = $this->HTMLBody; } elseif ($this->sendText && $this->sendHTML) { $boundary = '==MP_Bound_xyccr948x=='; $headers[] = 'MIME-Version: 1.0'; $headers[] = 'Content-type: multipart/alternative; boundary="' . $boundary . '"'; $message = 'This is a Multipart Message in MIME format.' . "\n"; $message .= '--' . $boundary . "\n"; $message .= 'Content-type: text/plain; charset="iso-8859-1"' . "\n"; $message .= 'Content-Transfer-Encoding: 7bit' . "\n\n"; // $message .= 'Content-Transfer-Encoding: quoted-printable' . "\n\n"; $message .= $this->textBody . "\n"; $message .= '--' . $boundary . "\n"; $message .= 'Content-type: text/html; charset="iso-8859-1"' . "\n"; $message .= 'Content-Transfer-Encoding: 7bit' . "\n\n"; $message .= $this->HTMLBody . "\n"; $message .= '--' . $boundary . '--'; } $success = mail($this->toAddress, $this->subject, $message, join("\r\n", $headers)); return $success; } } } ?> now the problem is when ever gmail recives the image code , <img src="http://yourdomain.com/image.jpg" > it escapes them like this : <img src=\"http://yourdomain.com/image.jpg\" > and the image is not read how could i resolve this ???
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.