473,705 Members | 2,446 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

html e-mail seding problem with php...

Hi to all,

I have the following html mail sender code written in php. It is
working properly but my problem is, code doesn't send the text
correctly which is in the varible "$mesaj". Code sends some unreadable
text. Any help would be appreciated, Thanx all.
Note: I put the sample image of the problem in:
http://www.wiliw.com/problem2.gif

Cem Louis

<?

$mesaj = "iİıIşŞğĞ ";

$mailtext = "<html><hea d>";
$mailtext .= "<meta http-equiv=\"Content-Type\" content=\"text/html;
charset=windows-1254\">";
$mailtext .= "<meta http-equiv=\"Content-Type\" content=\"text/html;
charset=ISO-8859-9\">";
$mailtext .= "<meta http-equiv=\"content-language\" content=\"TR\"> ";
$mailtext .= "</head><body>";
$mailtext .= "$mesaj";
$mailtext .= "</body></html>";

$headers .= "MIME-Version: 1.0 \n" ;
$headers .= "From: the mailer<ma****@s ite.com> \n";
$headers .= "X-Sender:ma****@s ite.com \n";
$headers .= "X-Mailer:Mailing system (ab***@me.com) \n";
$headers .= "X-Priority: 3 \n";
$headers .= "Return-Path: ma****@site.com \n";
$headers .= "Content-Type:text/html;charset=wi ndows-1254 \n";

$email_to = "re*******@site .com";
$frommail = "ma****@site.co m";
$subject_line = "Got mail from the site!";

mail($email_to, $subject_line,$ mailtext, $headers);

?>
Jul 17 '05 #1
15 2041
On 9 Jul 2004 13:37:11 -0700, ce******@phreak er.net (Cem Louis) wrote:
Hi to all,

I have the following html mail sender code written in php. It is $mailtext .= "<meta http-equiv=\"Content-Type\" content=\"text/html;


Good mail sites sill dump your mails based on this.
--
gburnore@databa six dot com
---------------------------------------------------------------------------
How you look depends on where you go.
---------------------------------------------------------------------------
Gary L. Burnore | ۳ݳ޳ݳۺ ݳ޳ݳݳ޳ݳ ۳
| ۳ݳ޳ݳۺ ݳ޳ݳݳ޳ݳ ۳
DataBasix | ۳ݳ޳ݳۺ ݳ޳ݳݳ޳ݳ ۳
| ۳ 3 4 1 4 2 ݳ޳ 6 9 0 6 9 ۳
Black Helicopter Repair Svcs Division | Official Proof of Purchase
=============== =============== =============== =============== ===============
Want one? GET one! http://signup.databasix.com
=============== =============== =============== =============== ===============
Jul 17 '05 #2
On 9 Jul 2004 13:37:11 -0700, ce******@phreak er.net (Cem Louis) wrote:
$mailtext .= "<meta http-equiv=\"Content-Type\" content=\"text/html;
charset=window s-1254\">";
$mailtext .= "<meta http-equiv=\"Content-Type\" content=\"text/html;
charset=ISO-8859-9\">";


Make up your mind which character set you're in?

--
Andy Hassall <an**@andyh.co. uk> / Space: disk usage analysis tool
http://www.andyh.co.uk / http://www.andyhsoftware.co.uk/space
Jul 17 '05 #3
Cem Louis wrote:
$headers .= "MIME-Version: 1.0 \n" ;


Mail headers should be separated by CRLF (that's "\r\n" in PHP)

--
USENET would be a better place if everybody read: | to email me: use |
http://www.catb.org/~esr/faqs/smart-questions.html | my name in "To:" |
http://www.netmeister.org/news/learn2quote2.html | header, textonly |
http://www.expita.com/nomime.html | no attachments. |
Jul 17 '05 #4
Hello

On 07/09/2004 05:37 PM, Cem Louis wrote:
Hi to all,

I have the following html mail sender code written in php. It is
working properly but my problem is, code doesn't send the text
correctly which is in the varible "$mesaj". Code sends some unreadable
text. Any help would be appreciated, Thanx all.
Note: I put the sample image of the problem in:
http://www.wiliw.com/problem2.gif


Messages with non-ASCII characters must be sent in quoted-printable
encoding.

You may want to take a look at this class that shows how to send
messages that way. It even comes with an example of how to send a
message in Japanese, but it could be any other idiom using any other
character set:

http://www.phpclasses.org/mimemessage
--

Regards,
Manuel Lemos

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/

Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html
Jul 17 '05 #5
On Fri, 09 Jul 2004 18:15:19 -0300, Manuel Lemos <ml****@acm.org >
calmly ranted:
You may want to take a look at this class that shows how to send
messages that way. It even comes with an example of how to send a
message in Japanese, but it could be any other idiom using any other
character set:

http://www.phpclasses.org/mimemessage


Any progress on that update, Manuel?
--------------------------------------------
-- I'm in touch with my Inner Curmudgeon. --
http://diversify.com Comprehensive Website Development
=============== =============== =============== ===============

Jul 17 '05 #6
Hello,

On 07/09/2004 09:54 PM, Larry Jaques wrote:
You may want to take a look at this class that shows how to send
messages that way. It even comes with an example of how to send a
message in Japanese, but it could be any other idiom using any other
character set:

http://www.phpclasses.org/mimemessage

Any progress on that update, Manuel?


What do you mean? The class supports quoted printable encoding and
custom character sets since a long time ago.

--

Regards,
Manuel Lemos

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/

Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html
Jul 17 '05 #7
Manuel Lemos <ml****@acm.org > wrote:
http://www.wiliw.com/problem2.gif


Messages with non-ASCII characters must be sent in quoted-printable
encoding.


This is not true for the body of a message, see rfc 2045 and look for
the 8bit and binary values for the content-transfer-encoding header.

--

Daniel Tryba

Jul 17 '05 #8
On Fri, 09 Jul 2004 22:04:27 -0300, Manuel Lemos <ml****@acm.org >
calmly ranted:
Hello,

On 07/09/2004 09:54 PM, Larry Jaques wrote:
You may want to take a look at this class that shows how to send
messages that way. It even comes with an example of how to send a
message in Japanese, but it could be any other idiom using any other
character set:

http://www.phpclasses.org/mimemessage

Any progress on that update, Manuel?


What do you mean? The class supports quoted printable encoding and
custom character sets since a long time ago.


How quickly they forget. ;)

-snip from 7/05 posts-
http://www.phpclasses.org/mimemessage

You provide a _very_ comprehensive class there, Manuel.
Do you by any chance have an instruction manual for it?
;)


Not yet. I can produce a reference manual soon from the class
auto-documentation. It would for instance like in this class:

http://www.phpclasses.org/xmlwriter

It will take me a few days. Just let me know if that would be useful.

Yes, please, VERY. I told my client I'd have her HTML newsletter up


It is almost done and I will probably release it later today, but if
you are in a hurry, you should look at the example scripts supplied
with the class.
-snip-

Now that things are back in context, how's it coming?
--------------------------------------------
-- I'm in touch with my Inner Curmudgeon. --
http://diversify.com Comprehensive Website Development
=============== =============== =============== ===============

Jul 17 '05 #9
Hello,

On 07/10/2004 05:11 AM, Daniel Tryba wrote:
Manuel Lemos <ml****@acm.org > wrote:
http://www.wiliw.com/problem2.gif


Messages with non-ASCII characters must be sent in quoted-printable
encoding.

This is not true for the body of a message, see rfc 2045 and look for
the 8bit and binary values for the content-transfer-encoding header.


Sorry, you cannot assume that the MTA that will get the message will
support 8 bit encoded messages or else your messages may get discarded
and then you wonder why the messages were not accepted. It is better to
play safe and let MTA convert to 8 bit when it knows it can do that.
--

Regards,
Manuel Lemos

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/

Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html
Jul 17 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
3125
by: Himanshu Garg | last post by:
Hello, I am trying to pinpoint an apparent bug in HTML::Parser. The encoding of the text seems to change incorrectly if the locale isn't set properly. However Parser.pm in the directory (/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi/HTML/) doesn't seem to contain the "real" parsing statements.
20
7349
by: Al Moritz | last post by:
Hi all, I was always told that the conversion of Word files to HTML as done by Word itself sucks - you get a lot of unnecessary code that can influence the design on web browsers other than Internet Explorer. Our computer expert in my company had told me already a while ago that I should learn HTML and encode myself. I was never inclined to do so (I am no computer expert), and when upon his suggestion I looked how my pages (converted to...
81
5161
by: sinister | last post by:
I wanted to spiff up my overly spartan homepage, and started using some CSS templates I found on a couple of weblogs. It looks fine in my browser (IE 6.0), but it doesn't print right. I tested the blogs, and one definitely didn't print right. Surveying the web, my impression is that CSS is very unreliable, because even updated browsers fail to implement the standards correctly. So should one just avoid CSS? Or is it OK if used...
82
6314
by: Eric Lindsay | last post by:
I have been trying to get a better understanding of simple HTML, but I am finding conflicting information is very common. Not only that, even in what seemed elementary and without any possibility of getting wrong it seems I am on very shaky ground . For example, pretty much every book and web course on html that I have read tells me I must include <html>, <head> and <body> tag pairs. I have always done that, and never questioned it. ...
1
3686
by: Peter Williams | last post by:
Hello All, I'm a newbie to this ng. I'm posting here because I have a question about debugging some javascript on some pages of my website. Please don't call me a "troll" -- because I'm not one. :-))) The next page is called "basic_snake" and creates a message which follows the cursor. Up until today, I used this type of message attached to the mouse pointer for the following pages on my website: index.html, delphi.html &...
40
5598
by: VK | last post by:
Hi, After the response on my request from W3C I'm still unclear about Tidy vs. Validator discrepansies. That started with <IFRAME> issue, but there is more as I know. Anyway, this very basic HTML page: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN" "http://www.w3.org/TR/html401/strict.dtd"> <html> <head>
1
1561
by: Ryan Ginstrom | last post by:
I have been maintaining a body of documentation in plain HTML files. I would now like to automate the generation of the HTML files. Maintaining the HTML files now is tedious and error prone, because every time I move/remove/add a section, I have to renumber the following sections and update my internal links. I have looked at some of the HTML-generation frameworks, but the selection is somewhat bewildering, and most also seem geared to...
3
2014
by: radsat | last post by:
Hi I have a html page, which has some sites, when the user clicks on the site, <tr><td><a href="us.html" onclick = "setSiteCode('US')">USA</a></td></tr> and the javascript is, var siteCode = ""; function setSiteCode(site) { window.siteCode=site;
1
2169
by: reemamg | last post by:
Have a piece of code which works in Firefox however doesnt work in IE <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE> New Document </TITLE> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <META NAME="Author" CONTENT=""> <META NAME="Keywords" CONTENT=""> <META NAME="Description" CONTENT="">
0
8767
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
1
9030
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8979
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7893
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6605
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5933
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4439
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3137
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2081
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.