Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Multiline header in mail function and in general ...

Posted on 2004-10-17
9
Medium Priority
?
292 Views
Last Modified: 2008-02-01
How do I send a multiine header in a email sent through PHP's mail function. Something line this:

X-MY-HEADER:  **********************
                                HELLO WOLRLD !
                       **********************

I tried using:

mail("me@mymail.com", "test", "test", "X-MY-HEADER: firstline \r\n secondline")

mail("me@mymail.com", "test", "test", "X-MY-HEADER: firstline \n secondline\r\n")

But they sent the second line in body of message. Please help.
0
Comment
Question by:akashwiz
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
9 Comments
 
LVL 36

Expert Comment

by:Zyloch
ID: 12335642
Hi akashwiz,

What about

firstline\r\nsecondline\r\n?

Or does it need to have something like this?

firstline\r\nComment: secondline\r\n?

Regards,
Zyloch
0
 
LVL 1

Author Comment

by:akashwiz
ID: 12335668
firstline\r\nsecondline\r\n   sent the second line in the body and firstline\r\nComment: secondline\r\n added another header "comment". I want both lines to be a part of same header.
0
 
LVL 36

Expert Comment

by:Zyloch
ID: 12335675
I don't know if this is possible. I guess you can also try

firstline\r\n:secondline\r\n
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:akashwiz
ID: 12335707
This is possible as I am receiving mails with same type of headers but unable to reproduce the same. Or is there a way by which I can insert hidden text into a e-mail?
0
 
LVL 36

Expert Comment

by:Zyloch
ID: 12335726
You mean multiline headers?
0
 
LVL 1

Author Comment

by:akashwiz
ID: 12335742
I want to insert some multiline text in the mails I send which remains invisible to the receiver. One way is to use a multiline header. But I don't know how to do it. Yes I am receiving mails with multiline headers.
0
 
LVL 36

Accepted Solution

by:
Zyloch earned 400 total points
ID: 12335776
Try this:

firstline\n secondline\r\n
0
 
LVL 1

Author Comment

by:akashwiz
ID: 12335799
Got it..  Thanks.. let me experiment a bit then I will accept your answer.
0
 
LVL 36

Expert Comment

by:Zyloch
ID: 12335813
Seems that the space is needed ;)
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question