Solved

Multiline header in mail function and in general ...

Posted on 2004-10-17
9
281 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
  • 5
  • 4
9 Comments
 
LVL 36

Expert Comment

by:Zyloch
Comment Utility
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
Comment Utility
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
Comment Utility
I don't know if this is possible. I guess you can also try

firstline\r\n:secondline\r\n
0
 
LVL 1

Author Comment

by:akashwiz
Comment Utility
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
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
LVL 36

Expert Comment

by:Zyloch
Comment Utility
You mean multiline headers?
0
 
LVL 1

Author Comment

by:akashwiz
Comment Utility
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 100 total points
Comment Utility
Try this:

firstline\n secondline\r\n
0
 
LVL 1

Author Comment

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

Expert Comment

by:Zyloch
Comment Utility
Seems that the space is needed ;)
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to dynamically set the form action using jQuery.
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 …

762 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now