[Hastymail-cvs] SF.net SVN: hastymail:[2041] trunk/hastymail2/lib/smtp_class.php
Brought to you by:
sailfrog,
slushpupie
From: <sai...@us...> - 2012-01-31 15:41:18
|
Revision: 2041 http://hastymail.svn.sourceforge.net/hastymail/?rev=2041&view=rev Author: sailfrog Date: 2012-01-31 15:41:08 +0000 (Tue, 31 Jan 2012) Log Message: ----------- fix for extraneous "<" and ">" being added to E-mail addresses in an outbound message subject Modified Paths: -------------- trunk/hastymail2/lib/smtp_class.php Modified: trunk/hastymail2/lib/smtp_class.php =================================================================== --- trunk/hastymail2/lib/smtp_class.php 2012-01-30 18:11:10 UTC (rev 2040) +++ trunk/hastymail2/lib/smtp_class.php 2012-01-31 15:41:08 UTC (rev 2041) @@ -588,7 +588,7 @@ $this->set_header('in_Reply_To', $this->encode_header_fld($this->in_reply_to)); $this->set_header('references', $this->encode_header_fld($this->references)); $this->set_header('from', $this->encode_header_fld($this->from)); - $this->set_header('subject', $this->encode_header_fld($this->subject)); + $this->set_header('subject', $this->encode_header_fld($this->subject, false)); $this->set_header('date', date("r")); $this->set_header('content_Type', 'text/plain; charset=UTF-8'); $this->set_header('MIME-Version', '1.0'); @@ -599,7 +599,7 @@ $this->set_header('message_id', $this->message_id); } } - function encode_header_fld($input) { + function encode_header_fld($input, $email=true) { global $user; $res = array(); $input = trim($input, ',; '); @@ -631,7 +631,7 @@ $res[] = $enc_val; } else { - if ($user->user_action->match_email($v)) { + if ($email && $user->user_action->match_email($v)) { $res[] = '<'.$v.'>'; } else { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |