[eluser]rt30000[/eluser]
CI andrea, I tried your outlook filter and that did not resolve my problem. I did check the email in another email app and it rendered correct. Just not in Outlook 2007, those =3d" issues remain. This is beyond me, I'm not sure exactly how to fix this. Thanks for all the help thus far.
Rob
[eluser]andreagam[/eluser]
rt30000, in my case =3D did not cause any problem to my email; instead I had serious problems with =00 strings. That caused my email message truncate to the first occurrence of the string.
Try eliminating unnecessary newlines from your html template. That solved my issue.
Maybe could help you too.
Good luck,
Andrea
[eluser]rt30000[/eluser]
Well, you may be right Andrea...perhaps the ="3D isn't the problem. I am getting a bunch of extra "=" signs and breaks throughout, when they do not exist within the html file I am sending. So, none of my images etc will display in Outlook. arg!
Code: <html>
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dutf-8">
<title>Lakeside Story Submission</title>
<link rel=3D"stylesheet" type=3D"text/css" href=3D"http://lakeside.shift2d=
esign.com/assets/img/email/story-submission/screen.css">
</head>
<body>
<table width=3D"100%" border=3D"0" cellspacing=3D"0" cellpadding=3D"0" clas=
s=3D"bg1">
<tr>
<td align=3D"center">
<table width=3D"600" border=3D"0" cellspacing=3D"0" cellpadding=3D"0" cl=
ass=3D"bg2">
<tr>
<td class=3D"header" align=3D"left">
<img >
</td>
</tr>
<tr>
<td valign=3D"top" class=3D"body">
<table width=3D"100%" border=3D"0" cellspacing=3D"0" cellpadding=3D"0=
">
<tr>
<td valign=3D"top" class=3D"mainbar" align=3D"left">
<h2>Lakeside Story Submission</h2>
<img
>
<p>From: <strong>ddd</strong><br />
Email: <strong><a >ddd</a></strong></p>
<h3>Title:</h3>
<p>ddd</p>
<h3>Story:</h3>
<p>ddd</p>
<br>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign=3D"middle" align=3D"left" class=3D"footer" height=3D"61">
<p>Tue, 04 Nov 08 11:10:07 -0700 | </p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
--B_ALT_49108fff72621--
[eluser]rt30000[/eluser]
Hmmmmmmmmmm So every troublesome line breaks with a "=" after 76 characters -- the default wordwrap. I have Code: $config['wordwrap'] = FALSE;
so how the heck is it doing this??? From what I understand from browsing these forums and the user guide, wordwrap should have no affect on html emails anyhow. I cannot get around it. I have tried the {unwrap} tag as well to no avail. Am I missing an encoding tag or config setup somehow?
[eluser]rt30000[/eluser]
A portion of the headers I receive in outlook, if it helps:
Code: ...
X-Mailer: CodeIgniter
X-Priority: 3 (Normal)
Message-ID: <[email protected]>
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="B_ALT_4910a4442e799"
This is a multi-part message in MIME format.
Your email application may not support this format.
--B_ALT_4910a4442e799
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Lakeside Story Submission
From: aaaa
Email: aaaaa
Title:
aaaa
Story:
aaaaa
--B_ALT_4910a4442e799
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable
[eluser]andreagam[/eluser]
Have you tried using $this->email->print_debugger() ?
If you want you might post the debugger result, it could help understand better...
Andrea
[eluser]rt30000[/eluser]
Well, time to revisit this issue. I still get some "=" signs in the email and it appears to break after 76 characters for unknown reasons. Also, it doesn't display as html on my iphone, I actually see the source code itself??? Talk about driving me nuts! Andrea, here is the debugger output:
Code: Your message has been successfully sent using the following protocol: mail
User-Agent: CodeIgniter
Date: Fri, 14 Nov 2008 11:18:34 -0700
From: "<removed>"
Return-Path:
Reply-To: "<removed>"
X-Sender: <removed>
X-Mailer: CodeIgniter
X-Priority: 3 (Normal)
Message-ID: <[email protected]>
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="B_ALT_491dc0faad3cf"
This is a multi-part message in MIME format.
Your email application may not support this format.
--B_ALT_491dc0faad3cf
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Lakeside Story Submission
From: Rob
Email: [email protected]
Title:
A title
Story:
ddddHuhuhuihiu whu awhduiawuihwa fawfawfawf af awf awfagfwghre gr
Fri, 14 Nov 08 11:18:34 -0700
--B_ALT_491dc0faad3cf
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Story Submission
<html>
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dutf-8">
<title>Story Submission</title>
<link rel=3D"stylesheet" type=3D"text/css" href=3D"http://lakeside.shift2d=
esign.com/assets/img/email/story-submission/screen.css">
</head>
<body>
<table width=3D"100%" border=3D"0" cellspacing=3D"0" cellpadding=3D"0" clas=
s=3D"bg1">
<tr>
<td align=3D"center">
<table width=3D"600" border=3D"0" cellspacing=3D"0" cellpadding=3D"0" cl=
ass=3D"bg2">
<tr>
<td class=3D"header" align=3D"left">
<img >
</td>
</tr>
<tr>
<td valign=3D"top" class=3D"body">
<table width=3D"100%" border=3D"0" cellspacing=3D"0" cellpadding=3D"0=
">
<tr>
<td valign=3D"top" class=3D"mainbar" align=3D"left">
<h2>Story Submission</h2>
<img
>
<p>From: <strong>Rob</strong><br />
Email: <strong><a >[email protected]</=
a></strong></p>
<h3>Title:</h3>
<p>A title</p>
<h3>Story:</h3>
<p>ddddHuhuhuihiu whu awhduiawuihwa fawfawfawf af awf awfagfwghre =
gr</p>
<br>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign=3D"middle" align=3D"left" class=3D"footer" height=3D"61">
<p>Fri, 14 Nov 08 11:18:34 -0700 | <a >www.lakesideohio.com</a></p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
<br>
--B_ALT_491dc0faad3cf--
[eluser]davidbehler[/eluser]
Are you actually sure, that your config file is loaded and used?
Because on line 970 of the Email.php library there is the following:
Code: if ($this->wordwrap === TRUE AND $this->mailtype != 'html')
{
$this->_body = $this->word_wrap($this->_body);
}
As your wordwrap is set to FALSE and your mailtype is html it should in no way use word-wrap.
Maybe you can manipulate the Email.php library and add an echo in its constructor/initialize function and see wether it's called or not.
[eluser]rt30000[/eluser]
Hi Waldmeister. Yes, I have checked that my config is loaded properly. I also just tried your echo statement within the email library and it did not get called (which is correct). I think the following is the troublesome area...
Inside the email library there is the following function...This is definately where it gets wrapped, you can see it even strips the {unwrap} tags so there's no way around it. If I uncomment the line within the class where this private function gets called my email sends without any breaks. It looks like it wraps to conform to standards, so how do other people accomplish this???
Code: // --------------------------------------------------------------------
/**
* Prep Quoted Printable
*
* Prepares string for Quoted-Printable Content-Transfer-Encoding
* Refer to RFC 2045 http://www.ietf.org/rfc/rfc2045.txt
*
* @access private
* @param string
* @param integer
* @return string
*/
function _prep_quoted_printable($str, $charlim = '')
{
// Set the character limit
// Don't allow over 76, as that will make servers and MUAs barf
// all over quoted-printable data
if ($charlim == '' OR $charlim > '76')
{
$charlim = '76';
}
// Reduce multiple spaces
$str = preg_replace("| +|", " ", $str);
// kill nulls
$str = preg_replace('/\x00+/', '', $str);
// Standardize newlines
if (strpos($str, "\r") !== FALSE)
{
$str = str_replace(array("\r\n", "\r"), "\n", $str);
}
// We are intentionally wrapping so mail servers will encode characters
// properly and MUAs will behave, so {unwrap} must go!
$str = str_replace(array('{unwrap}', '{/unwrap}'), '', $str);
// Break into an array of lines
$lines = explode("\n", $str);
$escape = '=';
$output = '';
foreach ($lines as $line)
{
$length = strlen($line);
$temp = '';
// Loop through each character in the line to add soft-wrap
// characters at the end of a line " =\r\n" and add the newly
// processed line(s) to the output (see comment on $crlf class property)
for ($i = 0; $i < $length; $i++)
{
// Grab the next character
$char = substr($line, $i, 1);
$ascii = ord($char);
// Convert spaces and tabs but only if it's the end of the line
if ($i == ($length - 1))
{
$char = ($ascii == '32' OR $ascii == '9') ? $escape.sprintf('s', dechex($ascii)) : $char;
}
// encode = signs
if ($ascii == '61')
{
$char = $escape.strtoupper(sprintf('s', dechex($ascii))); // =3D
}
// If we're at the character limit, add the line to the output,
// reset our temp variable, and keep on chuggin'
if ((strlen($temp) + strlen($char)) >= $charlim)
{
$output .= $temp.$escape.$this->crlf;
$temp = '';
}
// Add the character to our temporary line
$temp .= $char;
}
// Add our completed line to the output
$output .= $temp.$this->crlf;
}
// get rid of extra CRLF tacked onto the end
$output = substr($output, 0, strlen($this->crlf) * -1);
return $output;
}
// --------------------------------------------------------------------
[eluser]Unknown[/eluser]
Hello guys.
I have a problem with this behaviour. When sending a HTML email with a link inside it. If the link gets wrapped just before a dot in the domain name, that character is lost somewhere between CodeIgniter and the recipient mail client.
Yes, I'm not kidding.
Let's say we have an HTML body like this one:
Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html >
<head>
</head>
<body>
<h3>Código de Activación</h3>
<p>Para activar su cuenta, haga clic <a href="http://a.demo123.dnsalias.org/cliente/activar/4fa9fe5dcbe7eb0a79259a3858b937b9feaf446a/">aquí</a></p>
</body>
</html>
Email class will escape it creating one like this. Now, pay special attention to the line starting with ".org" because the mail reaching my mailbox lacks that character. Which forms an invalid URL: "a.demo123. dnsaliasorg/client..."
[pre]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.=
w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html >
<head>
</head>
<body>
<h3>Código de Activación</h3>
<p>Para activar su cuenta, haga clic <a href="http://a.demo123.dnsalias=
.org/cliente/activar/4fa9fe5dcbe7eb0a79259a3858b937b9feaf446a/">aquí</a></=
p>
</body>
</html>
[/pre]
NOTE: The equal sign after href has a 3D before the double quote character. I had to remove it for proper posting.
|