Solved

e-mail headers comma problem

Posted on 2004-09-13
6
324 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
[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
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
Get proactive database performance tuning online

At Percona’s web store you can order full Percona Database Performance Audit in minutes. Find out the health of your database, and how to improve it. Pay online with a credit card. Improve your database performance now!

 
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

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

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

Developer portfolios can be a bit of an enigma—how do you present yourself to employers without burying them in lines of code?  A modern portfolio is more than just work samples, it’s also a statement of how you work.
When the s#!t hits the fan, you don’t have time to look up who’s on call, draft emails, call collaborators, or send text messages. An instant chat window is definitely the way to go, especially one like HipChat. HipChat is a true business app. An…
This video teaches users how to migrate an existing Wordpress website to a new domain.
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

630 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