Page 1 of 1
mail
Posted: Tue Aug 31, 2004 10:55 am
by ol4pr0
using mime mail. this ends up in junk..
plain text with a link ofcourse, this mail is send after a form has been submitted. my headers as below
Code: Select all
$hdrs = array(
'Content-Type' => 'multipart/alternative\r\n',
'Content-Type' => 'text/html; charset=iso-8859-1\r\n',
'From' => 'Support@--------------.com\r\n',
'Subject' => 'Registro'
);
Posted: Tue Aug 31, 2004 11:56 am
by markl999
Try using double quotes instead of single. \r and \n don't do what you expect inside single quotes, they need double quotes to turn them into carriage return & line-feed

Posted: Tue Aug 31, 2004 12:02 pm
by ol4pr0
Still no go. .it makes me go absolutely mad.. especially when u kno0w that outlook itself does send it out and wont end up in junk mail.
Code: Select all
$hdrs = array(
"Content-transfer-encoding"=> "8bit\r\n",
"Content-Type" => "text/html; charset=iso-8859-1\r\n",
"Return-Path" => "support@--------------.com\r\n",
"MIME-Version"=> "1.0\r\n",
"From" => "Support@-------------.com\r\n",
"Subject" => "To Hoja de Vida Online\r\n"
);
#trying it all.. But.. GrrRRr
Posted: Tue Aug 31, 2004 12:05 pm
by feyd
just to make sure:
you're imploding that array, in some fashion, to a single string for the mail function, correct?
Posted: Tue Aug 31, 2004 12:11 pm
by ol4pr0
Code: Select all
include('Mail.php');
include('Mail/mime.php');
$html = '<html><body>large chunk of text, <a href="domein.com/id?=91612131213">Gracias</a></body></html>';
$crlf = "\r\n";
$hdrs = array(
"Content-Type" => "text/html; charset=iso-8859-1\r\n",
"Content-Transfer-Encoding"=> "binary\r\n",
"Return-Path" => "support@---------.com\r\n",
"MIME-Version"=> "1.0\r\n",
"From" => "Support@----------.com\r\n",
"Subject" => "To Hoja de Vida Online\r\n"
);
$mime = new Mail_mime($crlf);
$mime->setHTMLBody($html);
$body = $mime->get();
$hdrs = $mime->headers($hdrs);
$mail =& Mail::factory('mail');
$mail->send('-------@hotmail.com', $hdrs, $body);
Posted: Tue Aug 31, 2004 12:12 pm
by markl999
I don't know what the Mail_mime class is/does but this works ok
Code: Select all
<?php
$hdrs = array(
'Content-transfer-encoding'=> "8bit\r\n",
'Content-Type' => "text/html; charset=iso-8859-1\r\n",
'Return-Path' => "support@wherever.com\r\n",
'MIME-Version'=> "1.0\r\n",
'From' => "Support@wherever.com\r\n",
'Subject' => "To Hoja de Vida Online"
);
$to = 'youremail@goeshere.com';
$message = 'A link <a href="http://www.google.com">google</a> here.';
$headers = '';
foreach($hdrs as $key=>$val){
$headers .= $key.': '.$val;
}
mail($to, $hdrs['Subject'], $message, $headers);
echo 'Sent';
?>
It's not the cleanest way to do it but it works with your array format.
Posted: Tue Aug 31, 2004 12:13 pm
by ol4pr0
i will try this.. back in a bit.. however what is the clean way.
I dont know but.. my hotmail just junks it..
my text and ure google example text.
i do not have my filter set to the max.
Posted: Tue Aug 31, 2004 12:24 pm
by ol4pr0
it even junks this
Code: Select all
<html><body><p><body><div><font face="Arial" size="2"><div>Hola..</font></div></body></html>
Posted: Tue Aug 31, 2004 12:29 pm
by markl999
Check Hotmail's specs if you can, it may
require additional headers to make it valid.