Solved

e-mail headers comma problem

Posted on 2004-09-13
6
321 Views
Last Modified: 2010-05-18
I'm not sure this is the right area to place the question but since i didn't find more appropriate one, here it is..

In the header the From: field has the following format:

From: John Jin Doe  <john@doe.com>

but I need to have smth like:

From: Jin Doe,  John <john@doe.com>

However this does not work, because it obvously treats this expression as 2 comma-separated e-mails.
And it generates smth. like this:

From: Jin.Doe@mailserver.com, John <john@doe.com>

So the question is, is there a way to encode this comma in some way, so that it doesn't confuse the parser?
0
Comment
Question by:alkalined
6 Comments
 
LVL 11

Accepted Solution

by:
raj3060 earned 125 total points
ID: 12045215
Did you try this;
From: "John Jin Doe" <john@doe.com>
--Raj
0
 
LVL 19

Expert Comment

by:webwoman
ID: 12048328
That's not a good format for a from field. That field should ONLY have the email address. It doesn't need anything else.
0
 
LVL 11

Expert Comment

by:raj3060
ID: 12048969
Then he is gonna need one email address field and one namem field.
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
LVL 19

Expert Comment

by:webwoman
ID: 12050500
If he wants a name, yes. The name has nothing to do with the email address.

The from field in the email should only be an email address. If you want a name, that's fine, but it doesn't change the from field on the email.

Don't get confused with how the email client DISPLAYS the from field and what it actually IS.
0
 
LVL 5

Expert Comment

by:ITcrow
ID: 12051759
Could you tell us little bit more about what you are doing.
- Are you sending email using script
- Or you are trying to parse received email data.

In either case, I will agree with what Raj said in the beginning. Use double quotes around the name when there is a comma present.
0
 
LVL 1

Author Comment

by:alkalined
ID: 12052033
I'm making a script and I do need the name..
Raj3060's suggestion did the job so i'm giving him the points.
0

Featured Post

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

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

Suggested Solutions

Because your company can’t afford for you to make SEO mistakes, you’ll want to ensure you’re taking the right steps each and every time you post a new piece of content. This list of optimization do’s and don’ts can help you become an SEO wizard.
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

679 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