Solved

e-mail headers comma problem

Posted on 2004-09-13
6
315 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
Comment Utility
Did you try this;
From: "John Jin Doe" <john@doe.com>
--Raj
0
 
LVL 19

Expert Comment

by:webwoman
Comment Utility
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
Comment Utility
Then he is gonna need one email address field and one namem field.
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 19

Expert Comment

by:webwoman
Comment Utility
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
Comment Utility
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
Comment Utility
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Both Easy and Powerful How easy is PHP? http://lmgtfy.com?q=how+easy+is+php (http://lmgtfy.com?q=how+easy+is+php)  Very easy.  It has been described as "a programming language even my grandmother can use." How powerful is PHP?  http://en.wikiped…
Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…

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