Author Topic: [Mini-MOD] Send mails with HTML tags  (Read 5024 times)

0 Members and 1 Guest are viewing this topic.

Offline drastx

  • Newbie
  • *
  • Posts: 41
    • View Profile
[Mini-MOD] Send mails with HTML tags
« on: April 05, 2007, 10:23:50 PM »
Hello!

I saw few topics with this problem.
It's a really small change, so everyone can do.
After that, you'll be able to send HTML mails.

1. Open includes/email.php

find:
Code: [Select]

  function create_header() {
    global $config;
    $header = "";
    if (empty($this->from)) {
      $header .= sprintf("Return-Path: %s\r\n", $config['site_email']);

      $header .= sprintf("From: %s\r\n", $config['site_email']);
    }
    else {
      $header .= $this->from;
    }

And change to this:
Code: [Select]

  function create_header() {
    global $config;
    $header = "";
    if (empty($this->from)) {
      $header .= sprintf("Return-Path: %s\r\n", $config['site_email']);

   $header = sprintf("MIME-Version: 1.0\n");
   $header .= sprintf("Content-type: text/html; charset=iso-8859-2\n");
      $header .= sprintf("From: %s\r\n", $config['site_email']);
    }
    else {
      $header .= $this->from;
    }


Now you should edit your templates (lang/*your_language*/email/) using HTML tags.

greetings ;)

Offline FotoRalle

  • Jr. Member
  • **
  • Posts: 57
  • 4images als bestes Community-Script
    • View Profile
    • rs webregie | webdesign & webmaster
Re: [Mini-MOD] Send mails with HTML tags
« Reply #1 on: May 20, 2009, 01:06:23 PM »
I will test it. Thank you!

Ralf

Offline Sun Zaza

  • Sr. Member
  • ****
  • Posts: 399
    • View Profile
Re: [Mini-MOD] Send mails with HTML tags
« Reply #2 on: August 14, 2010, 06:53:46 PM »
It doesnt' work!!!