Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

e-mail headers comma problem

Posted on 2004-09-13
6
Medium Priority
?
332 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 500 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
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!

 
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Although a lot of people devote their energy toward marketing for specific industries, there are some basic principles that can be applied to any sector imaginable. We’ll look at four steps to take and examine how those steps were put into action fo…
Australian government abolished Visa 457 earlier this April and this article describes how this decision might affect Australian IT scene and IT experts.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to count occurrences of each item in an array.
Suggested Courses

876 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