|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Hi guys !
Here is my problem : When I'm using the mail function with an html mail, everything goes fine. However, the first line displayed is always : Message-ID: 1202822468-contact@xxx.xxx Date: Tue, 12 Feb 2008 14:21:08 +0100 (CET) followed by the html mail well interpreted. I guess that something wrong with the headers : $headers = 'From: contact <contact@xxx.xxx>' . "\r\n" . 'Content-type: text/html; charset=iso-8859-1' . "\r\n" . 'Message-ID: ' . time() . '-contact@xxx.xxx' . "\r\n"; If I ever try to put the "MIME-version: 1.0" header, the html won't be interpreted anymore... Does someone could with that ?? Thanks |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
arnaud.icard@gmail.com wrote:
> Hi guys ! > > Here is my problem : > > When I'm using the mail function with an html mail, everything goes > fine. > However, the first line displayed is always : > > Message-ID: 1202822468-contact@xxx.xxx Date: Tue, 12 Feb 2008 14:21:08 > +0100 (CET) > > followed by the html mail well interpreted. > I guess that something wrong with the headers : > > $headers = 'From: contact <contact@xxx.xxx>' . "\r\n" . > 'Content-type: text/html; charset=iso-8859-1' . "\r\n" . > 'Message-ID: ' . time() . '-contact@xxx.xxx' . "\r\n"; > > > If I ever try to put the "MIME-version: 1.0" header, the html won't be > interpreted anymore... > > Does someone could with that ?? > > Thanks Looks like your system is rewriting the message-ID: header. I suggest you look up the relevant RFC and ensure your message-id: header is correctly formatted,then maybe it will leave it alone. It is conventional to encapsulate the message-ID: value in <angle brackets> It may be mandatory. Try it. If you are faking your own mail headers, remember to put a blank line at the end of them too. The blank line means 'end of headers' Any extra blank lines will push headers afterwards into the body text. |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
On 12 fév, 14:54, The Natural Philosopher <a...@b.c> wrote:
> arnaud.ic...@gmail.com wrote: > > Hi guys ! > > > Here is my problem : > > > When I'm using the mail function with an html mail, everything goes > > fine. > > However, the first line displayed is always : > > > Message-ID: 1202822468-cont...@xxx.xxx Date: Tue, 12 Feb 2008 14:21:08 > > +0100 (CET) > > > followed by the html mail well interpreted. > > I guess that something wrong with the headers : > > > $headers = 'From: contact <cont...@xxx.xxx>' . "\r\n" . > > 'Content-type: text/html; charset=iso-8859-1' . "\r\n" . > > 'Message-ID: ' . time() . '-cont...@xxx.xxx' . "\r\n"; > > > If I ever try to put the "MIME-version: 1.0" header, the html won't be > > interpreted anymore... > > > Does someone could with that ?? > > > Thanks > > Looks like your system is rewriting the message-ID: header. > > I suggest you look up the relevant RFC and ensure your message-id: > header is correctly formatted,then maybe it will leave it alone. > > It is conventional to encapsulate the message-ID: value in <angle > brackets> It may be mandatory. Try it. > > If you are faking your own mail headers, remember to put a blank line at > the end of them too. > > The blank line means 'end of headers' > > Any extra blank lines will push headers afterwards into the body text. Well thanks for your response but "<" ">" did not work. I've send the mail to my lotus notes mailbox and gmail box but same problem here |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
On Tue, 12 Feb 2008 15:04:56 +0100, <arnaud.icard@gmail.com> wrote:
> On 12 fév, 14:54, The Natural Philosopher <a...@b.c> wrote: >> arnaud.ic...@gmail.com wrote: >> > Hi guys ! >> >> > Here is my problem : >> >> > When I'm using the mail function with an html mail, everything goes >> > fine. >> > However, the first line displayed is always : >> >> > Message-ID: 1202822468-cont...@xxx.xxx Date: Tue, 12 Feb 2008 14:21:08 >> > +0100 (CET) >> >> > followed by the html mail well interpreted. >> > I guess that something wrong with the headers : >> >> > $headers = 'From: contact <cont...@xxx.xxx>' . "\r\n" . >> > 'Content-type: text/html; charset=iso-8859-1' . "\r\n" . >> > 'Message-ID: ' . time() . '-cont...@xxx.xxx' . "\r\n"; >> >> > If I ever try to put the "MIME-version: 1.0" header, the html won't be >> > interpreted anymore... >> >> > Does someone could with that ?? >> >> > Thanks >> >> Looks like your system is rewriting the message-ID: header. >> >> I suggest you look up the relevant RFC and ensure your message-id: >> header is correctly formatted,then maybe it will leave it alone. >> >> It is conventional to encapsulate the message-ID: value in <angle >> brackets> It may be mandatory. Try it. >> >> If you are faking your own mail headers, remember to put a blank line at >> the end of them too. >> >> The blank line means 'end of headers' >> >> Any extra blank lines will push headers afterwards into the body text. > > Well thanks for your response but "<" ">" did not work. > I've send the mail to my lotus notes mailbox and gmail box but same > problem here What does the source of the mail tell you? And do you really need to set a manual message-id? What if you leave it out? And allthough this is how it should be done, any difference when using "\n" instead of "\r\n"? -- Rik Wasmus |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
On 12 fév, 16:08, "Rik Wasmus" <luiheidsgoe...@hotmail.com> wrote:
> On Tue, 12 Feb 2008 15:04:56 +0100, <arnaud.ic...@gmail.com> wrote: > > On 12 fév, 14:54, The Natural Philosopher <a...@b.c> wrote: > >> arnaud.ic...@gmail.com wrote: > >> > Hi guys ! > > >> > Here is my problem : > > >> > When I'm using the mail function with an html mail, everything goes > >> > fine. > >> > However, the first line displayed is always : > > >> > Message-ID: 1202822468-cont...@xxx.xxx Date: Tue, 12 Feb 2008 14:21:08 > >> > +0100 (CET) > > >> > followed by the html mail well interpreted. > >> > I guess that something wrong with the headers : > > >> > $headers = 'From: contact <cont...@xxx.xxx>' . "\r\n" . > >> > 'Content-type: text/html; charset=iso-8859-1' . "\r\n" . > >> > 'Message-ID: ' . time() . '-cont...@xxx.xxx' . "\r\n"; > > >> > If I ever try to put the "MIME-version: 1.0" header, the html won't be > >> > interpreted anymore... > > >> > Does someone could with that ?? > > >> > Thanks > > >> Looks like your system is rewriting the message-ID: header. > > >> I suggest you look up the relevant RFC and ensure your message-id: > >> header is correctly formatted,then maybe it will leave it alone. > > >> It is conventional to encapsulate the message-ID: value in <angle > >> brackets> It may be mandatory. Try it. > > >> If you are faking your own mail headers, remember to put a blank line at > >> the end of them too. > > >> The blank line means 'end of headers' > > >> Any extra blank lines will push headers afterwards into the body text. > > > Well thanks for your response but "<" ">" did not work. > > I've send the mail to my lotus notes mailbox and gmail box but same > > problem here > > What does the source of the mail tell you? And do you really need to set a > manual message-id? What if you leave it out? And allthough this is how it > should be done, any difference when using "\n" instead of "\r\n"? > -- > Rik Wasmus YES ! Using "\n" instead of "\r\n" is the tips ! Thanks a lot for your guys |
|
|
|
#6 |
|
Messages: n/a
Hébergeur: |
arnaud.icard@gmail.com wrote:
> On 12 fév, 16:08, "Rik Wasmus" <luiheidsgoe...@hotmail.com> wrote: >> On Tue, 12 Feb 2008 15:04:56 +0100, <arnaud.ic...@gmail.com> wrote: >>> On 12 fév, 14:54, The Natural Philosopher <a...@b.c> wrote: >>>> arnaud.ic...@gmail.com wrote: >>>>> Hi guys ! >>>>> Here is my problem : >>>>> When I'm using the mail function with an html mail, everything goes >>>>> fine. >>>>> However, the first line displayed is always : >>>>> Message-ID: 1202822468-cont...@xxx.xxx Date: Tue, 12 Feb 2008 14:21:08 >>>>> +0100 (CET) >>>>> followed by the html mail well interpreted. >>>>> I guess that something wrong with the headers : >>>>> $headers = 'From: contact <cont...@xxx.xxx>' . "\r\n" . >>>>> 'Content-type: text/html; charset=iso-8859-1' . "\r\n" . >>>>> 'Message-ID: ' . time() . '-cont...@xxx.xxx' . "\r\n"; >>>>> If I ever try to put the "MIME-version: 1.0" header, the html won't be >>>>> interpreted anymore... >>>>> Does someone could with that ?? >>>>> Thanks >>>> Looks like your system is rewriting the message-ID: header. >>>> I suggest you look up the relevant RFC and ensure your message-id: >>>> header is correctly formatted,then maybe it will leave it alone. >>>> It is conventional to encapsulate the message-ID: value in <angle >>>> brackets> It may be mandatory. Try it. >>>> If you are faking your own mail headers, remember to put a blank line at >>>> the end of them too. >>>> The blank line means 'end of headers' >>>> Any extra blank lines will push headers afterwards into the body text. >>> Well thanks for your response but "<" ">" did not work. >>> I've send the mail to my lotus notes mailbox and gmail box but same >>> problem here >> What does the source of the mail tell you? And do you really need to set a >> manual message-id? What if you leave it out? And allthough this is how it >> should be done, any difference when using "\n" instead of "\r\n"? >> -- >> Rik Wasmus > > YES ! Using "\n" instead of "\r\n" is the tips ! > > Thanks a lot for your guys Then something in PHP is not sending the headers correctly. "\r\n" is strictly RFC822. I found something stupidly similar when I used mail()..it double spaced everything. I bet it expands bot \r and \n to \r\n or something stoopid. |
|
|
|
#7 |
|
Messages: n/a
Hébergeur: |
On Tue, 12 Feb 2008 18:42:37 +0100, The Natural Philosopher <a@b.c> wrote:
> arnaud.icard@gmail.com wrote: >> On 12 fév, 16:08, "Rik Wasmus" <luiheidsgoe...@hotmail.com> wrote: >>> On Tue, 12 Feb 2008 15:04:56 +0100, <arnaud.ic...@gmail.com> wrote: >>>> On 12 fév, 14:54, The Natural Philosopher <a...@b.c> wrote: >>>>> arnaud.ic...@gmail.com wrote: >>>>>> Hi guys ! >>>>>> Here is my problem : >>>>>> When I'm using the mail function with an html mail, everything goes >>>>>> fine. >>>>>> However, the first line displayed is always : >>>>>> Message-ID: 1202822468-cont...@xxx.xxx Date: Tue, 12 Feb 2008 >>>>>> 14:21:08 >>>>>> +0100 (CET) >>>>>> followed by the html mail well interpreted. >>>>>> I guess that something wrong with the headers : >>>>>> $headers = 'From: contact <cont...@xxx.xxx>' . "\r\n" . >>>>>> 'Content-type: text/html; charset=iso-8859-1' . "\r\n" . >>>>>> 'Message-ID: ' . time() . '-cont...@xxx.xxx' . "\r\n"; >>>>>> If I ever try to put the "MIME-version: 1.0" header, the html won't >>>>>> be >>>>>> interpreted anymore... >>>>>> Does someone could with that ?? >>>>>> Thanks >>>>> Looks like your system is rewriting the message-ID: header. >>>>> I suggest you look up the relevant RFC and ensure your message-id: >>>>> header is correctly formatted,then maybe it will leave it alone. >>>>> It is conventional to encapsulate the message-ID: value in <angle >>>>> brackets> It may be mandatory. Try it. >>>>> If you are faking your own mail headers, remember to put a blank >>>>> line at >>>>> the end of them too. >>>>> The blank line means 'end of headers' >>>>> Any extra blank lines will push headers afterwards into the body >>>>> text. >>>> Well thanks for your response but "<" ">" did not work. >>>> I've send the mail to my lotus notes mailbox and gmail box but same >>>> problem here >>> What does the source of the mail tell you? And do you really need to >>> set a >>> manual message-id? What if you leave it out? And allthough this is how >>> it >>> should be done, any difference when using "\n" instead of "\r\n"? >> YES ! Using "\n" instead of "\r\n" is the tips ! >> Thanks a lot for your guys > Then something in PHP is not sending the headers correctly. "\r\n" is > strictly RFC822. > > I found something stupidly similar when I used mail()..it double spaced > everything. > > I bet it expands bot \r and \n to \r\n or something stoopid. Mostly, this isn't PHP, but a borked MTA. -- Rik Wasmus |
|
|
|
#8 |
|
Messages: n/a
Hébergeur: |
In article <6cd81278-9341-4ea3-8622-918d66e640ca@d70g2000hsb.googlegroups.com>,
<arnaud.icard@gmail.com> wrote: > >If I ever try to put the "MIME-version: 1.0" header, the html won't be >interpreted anymore... The problems I had with mail() were solved by using the phpmailer class from http://sourceforge.net/project/showf...group_id=26031 -A |
|
![]() |
| Outils de la discussion | |
|
|