|
-
Aug 5th, 2003, 05:18 AM
#1
Thread Starter
Member
Email Question
Dear all,
I'm using the below mentioned code along with my emails....when i receive an email i see an attachment sign with it......and the mail isn't an attachment...
When i remove some of the part of it...then i don't see <HTML> emails.....
I want to send HTML emails....
Kindly let me know why is it so.....
Thanks
FmKing
####################################
$subject = "Subject";
$cl_mail_boundary = md5(uniqid(time()));
$mail_headers = "From:<[email protected]>\r\n";
$mail_headers .= "MIME-Version: 1.0\r\n";
$mail_headers .= "Content-type: multipart/mixed;boundary=\"$cl_mail_boundary\"";
$mail_headers .= "\r\n\r\n";
$mail_headers .= "This is a multi-part message in MIME format.";
$mail_headers .= "\r\n\r\n";
$message = "--$cl_mail_boundary\n";
$message .= "Content-type: text/html; charset=en\r\n";
$message .= "Content-transfer-encoding: 8bit\r\n\r\n";
$message .= "The message goes here";
####################################
-
Aug 5th, 2003, 03:06 PM
#2
Frenzied Member
for one you are missing half of your charset. and you don't add teh content-type in the message but you add it in the header.
another is that you don't need all that to send html email.
PHP Code:
$subject = "Subject";
$mail_headers = "From:<[email protected]>\r\n";
$mail_headers .= "Content-type: text/html\r\n";
$message = "The message goes here";
that is all you need.
-
Aug 6th, 2003, 01:09 AM
#3
Thread Starter
Member
Thanks a lot for replying and pointing out the mistakes.....
What else do i need to add in the charset........
And what exactly do i need to send a proper HTML email.
Thanks
FmKing
-
Aug 6th, 2003, 03:15 PM
#4
Frenzied Member
I already showed you.
PHP Code:
$subject = "Subject";
$mail_headers = "From:<[email protected]>\r\n";
$mail_headers .= "Content-type: text/html\r\n";
$message = "<html><head></head><body>";
$message .= "The message goes here";
$message .= "</body></html>";
-
Aug 7th, 2003, 01:46 AM
#5
Thread Starter
Member
Thanks a lot dear..
It worked out just fine..
FmKing
***************************
Sharing Knowledge = Good Deed
***************************
-
Aug 7th, 2003, 11:35 AM
#6
Frenzied Member
you're welcome
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|