Re: [PHP] html emails and plain text dectection

2007-07-17 Thread Richard Lynch
On Tue, July 17, 2007 10:41 am, brian wrote:
> Ross wrote:
>
>> I am using the code to send an html email (phpmailer class) now I
>> need to
>> somehow determine if the recipient uses text only email and change
>> email to
>> plain. Is this possible?
>>
>
> No. How could your script possibly detect how a person's email client
> is
> configured?
>
> In any case, you should be sending both parts--plain text & HTML--and
> allowing the recipients to view it as they wish. And sending mail as
> HTML only is a good way to have your messages marked as SPAM.

Correction:

Sending your email as HTML enhanced is a good way to have your
messages marked as SPAM.

Sending your email as HTML only is a GREAT way to have your messages
marked as SPAM.

:-)

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] html emails and plain text dectection

2007-07-17 Thread Richard Lynch
On Mon, July 16, 2007 8:58 am, Ross wrote:
> I am using the code to send an html email (phpmailer class) now I need
> to
> somehow determine if the recipient uses text only email and change
> email to
> plain. Is this possible?

Not really...

I mean, you could send them an email with an HTML "enhanced" (cough,
cough) body that has a "click here" and a plain text link that goes
somewhere else, and if they click on one or the other, you know if
their current email reader, which might not be their usual mail
reader, does or doesn't do HTML enhanced (cough, cough) email...

You really should ask them when they subscribe, so they can CHOOSE if
they want plain text or that bloated blight upon the land known as
HTML enhanced email.

Not that I'm biased or anything :-)

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] html emails and plain text dectection

2007-07-17 Thread brian

Ross wrote:

I am using the code to send an html email (phpmailer class) now I need to 
somehow determine if the recipient uses text only email and change email to 
plain. Is this possible?




No. How could your script possibly detect how a person's email client is 
configured?


In any case, you should be sending both parts--plain text & HTML--and 
allowing the recipients to view it as they wish. And sending mail as 
HTML only is a good way to have your messages marked as SPAM.


brian

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] html emails and plain text dectection

2007-07-16 Thread Richard Heyes

Ross wrote:
I am using the code to send an html email (phpmailer class) now I need to 
somehow determine if the recipient uses text only email and change email to 
plain. Is this possible?


No.

--
Richard Heyes
+44 (0)844 801 1072
http://www.websupportsolutions.co.uk

Knowledge Base and HelpDesk software
that can cut the cost of online support

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] html emails and plain text dectection

2007-07-16 Thread Stut

Ross wrote:
I am using the code to send an html email (phpmailer class) now I need to 
somehow determine if the recipient uses text only email and change email to 
plain. Is this possible?


Not really, no. You can send both HTML and plain text versions in the 
same email and nearly all clients will correctly extract the right one. 
AFAIK phpmailer supports doing this but you'll have to check their 
documentation for details.


-Stut

--
http://stut.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] html emails and plain text dectection

2007-07-16 Thread Ross
I am using the code to send an html email (phpmailer class) now I need to 
somehow determine if the recipient uses text only email and change email to 
plain. Is this possible?


include( 'html_emails/html2.php' );
$mail_body = ob_get_contents();
ob_end_clean();

include("../mailer/class.phpmailer.php");

$mail = new PHPMailer();
$mail->Mailer = "mail";
$mail->IsHTML(true);
$mail->Host = "imap.1and1.co.uk";
$mail->FromName = "Legal Services UK";
$mail->From = "x.";
$mail->Sender = "x>";
$mail->Subject = $_POST['mail_subject'];



 $mail_to = $_POST['mail_to'];
 $addresses = array();
$addresses = explode(",", $mail_to);


$mail->AddAttachment($userfile, $_FILES['userfile']['name']);
$mail->Subject = $_POST['mail_subject'];
$mail->Body =$mail_body;
$mail->WordWrap = 50;

for($i = 0; $i < count($addresses); $i++)
{
 $mail->AddAddress($addresses[$i]);
 if(!$mail->Send())
 {
echo "Message was not sent";
echo "Mailer Error: " . $mail->ErrorInfo;
 }
$mail->ClearAddresses();
 ?>
 



 http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php