Coder Social home page Coder Social logo

mail_mime's Introduction

This package is http://pear.php.net/package/Mail_Mime and has been migrated from http://svn.php.net/repository/pear/packages/Mail_Mime

Please report all new issues via the PEAR bug tracker.

If this package is marked as unmaintained and you have fixes, please submit your pull requests and start discussion on the pear-qa mailing list.

To test, run either
$ phpunit tests/
  or
$ pear run-tests -r

To build, simply
$ pear package

To install from scratch
$ pear install package.xml

To upgrade
$ pear upgrade -f package.xml

mail_mime's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mail_mime's Issues

1.10.5 multipart/alternative boundaries are different in header and body

-No change in my example php code below

  • upgrade to mail_mime 1.10.5, the boundary in the Content-Type: multipart/alternative header is different from the body
  • downgrade to mail_mime 1.10.4, the boundary in the header is the same as in the body. Correct.
  • as per the warning in the changelog of 1.10.5, I am not setting Content-Transfer-Encoding on multipart messages. mail_mime defaults to multipart/alternative.

Example code:
$mime = new Mail_mime(array('eol' => PHP_EOL));
$mime->setTXTBody($text);
$mime->setHTMLBody($html);
$mime_params = array(
'text_encoding' => '7bit',
'text_charset' => 'UTF-8',
'html_charset' => 'UTF-8',
'head_charset' => 'UTF-8'
);
$body = $mime->get($mime_params);
$hdrs = array(
'From' => $from,
'Subject' => $subject,
'To' => $to
);
$hdrs = $mime->headers($hdrs);
$msg = '';
foreach ($hdrs as $key => $val){
$msg .= $key.": ".$val.PHP_EOL;
}
$msg .= PHP_EOL."This is a multi-part message in MIME format.".PHP_EOL;
$msg .= $body;
echo $msg;
//----------------------------------------------------

//correct (expected) result: from 1.10.4
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="=_15b567cd99cd8009c9780e9d7d92e055"
From: XXX [email protected]
Subject: YYY
To: ZZZ

This is a multi-part message in MIME format.
--=_15b567cd99cd8009c9780e9d7d92e055
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=UTF-8

Please view this mail in a HTML-capable mail client
--=_15b567cd99cd8009c9780e9d7d92e055

//-----------------------------------------------------------------------------

Incorrect result (from 1.10.5)
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="=_06f4d55e551f6d0099afe89eaae519b2"
From: XXX [email protected]
Subject: YYY
To: ZZZ

This is a multi-part message in MIME format.
--=_2e148fc164447df3cad439932ec7c841
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=UTF-8

Please view this mail in a HTML-capable mail client
--=_2e148fc164447df3cad439932ec7c841

Omission of middle part of ternary operator breaks on PHP < 5.3

(Apologies for logging this here, but the PEAR bug tracker seems to be broken and throws an error when I try to submit a bug.)

There are a few places in the codebase that have recently been updated to remove the middle part of a ternary operator.

For example, in mime.php, line 795 has been changed from:

        return $res ? $res : true;

to

        return $res ?: true;

This needlessly breaks support for php < 5.3 and should be reverted.

How to send attachment with hebrew filename?

I believe it has something to do with: $n_encoding = null , $f_encoding = null. But I can't figure out exactly what I'm doing wrong. Any idea on what to put there to make the filename not gibberish?

Great Library otherwise!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.