unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* How to extract the email address from the From: header?
@ 2014-10-24 20:00 Marcin Borkowski
  2014-10-24 20:05 ` Allan Streib
  2014-10-24 20:37 ` Eric Abrahamsen
  0 siblings, 2 replies; 4+ messages in thread
From: Marcin Borkowski @ 2014-10-24 20:00 UTC (permalink / raw)
  To: help-gnu-emacs

Hi list,

"From" headers (or "To" ones, for that matter) are sometimes plain email
addresses and sometimes strings of the form "Real Name
<email@add.ress>".  I could write a function (or maybe even a regex) to
extract the email part in the latter case, but Emacs being Emacs, I'm
pretty sure something like that already exists.  Am I right?

TIA,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to extract the email address from the From: header?
  2014-10-24 20:00 How to extract the email address from the From: header? Marcin Borkowski
@ 2014-10-24 20:05 ` Allan Streib
  2014-10-24 20:12   ` Igor Sosa Mayor
  2014-10-24 20:37 ` Eric Abrahamsen
  1 sibling, 1 reply; 4+ messages in thread
From: Allan Streib @ 2014-10-24 20:05 UTC (permalink / raw)
  To: Marcin Borkowski, help-gnu-emacs

Marcin Borkowski <mbork@wmi.amu.edu.pl> writes:

> "From" headers (or "To" ones, for that matter) are sometimes plain
> email addresses and sometimes strings of the form "Real Name
> <email@add.ress>".  I could write a function (or maybe even a regex)
> to extract the email part in the latter case, but Emacs being Emacs,
> I'm pretty sure something like that already exists.  Am I right?

Have a look at bbdb-snarf.el

Allan



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to extract the email address from the From: header?
  2014-10-24 20:05 ` Allan Streib
@ 2014-10-24 20:12   ` Igor Sosa Mayor
  0 siblings, 0 replies; 4+ messages in thread
From: Igor Sosa Mayor @ 2014-10-24 20:12 UTC (permalink / raw)
  To: help-gnu-emacs

Allan Streib <astreib@indiana.edu> writes:

> Marcin Borkowski <mbork@wmi.amu.edu.pl> writes:
>
>> "From" headers (or "To" ones, for that matter) are sometimes plain
>> email addresses and sometimes strings of the form "Real Name
>> <email@add.ress>".  I could write a function (or maybe even a regex)
>> to extract the email part in the latter case, but Emacs being Emacs,
>> I'm pretty sure something like that already exists.  Am I right?
>
> Have a look at bbdb-snarf.el

thanks! interesting...

-- 
:: Igor Sosa Mayor     :: joseleopoldo1792@gmail.com ::
:: GnuPG: 0x1C1E2890   :: http://www.gnupg.org/      ::
:: jabberid: rogorido  ::                            ::




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to extract the email address from the From: header?
  2014-10-24 20:00 How to extract the email address from the From: header? Marcin Borkowski
  2014-10-24 20:05 ` Allan Streib
@ 2014-10-24 20:37 ` Eric Abrahamsen
  1 sibling, 0 replies; 4+ messages in thread
From: Eric Abrahamsen @ 2014-10-24 20:37 UTC (permalink / raw)
  To: help-gnu-emacs

Marcin Borkowski <mbork@wmi.amu.edu.pl> writes:

> Hi list,
>
> "From" headers (or "To" ones, for that matter) are sometimes plain email
> addresses and sometimes strings of the form "Real Name
> <email@add.ress>".  I could write a function (or maybe even a regex) to
> extract the email part in the latter case, but Emacs being Emacs, I'm
> pretty sure something like that already exists.  Am I right?

Check `gnus-extract-address-components', which claims to be a
simpler/faster version of `mail-extract-address-components', which also
see.

Eric





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-10-24 20:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-24 20:00 How to extract the email address from the From: header? Marcin Borkowski
2014-10-24 20:05 ` Allan Streib
2014-10-24 20:12   ` Igor Sosa Mayor
2014-10-24 20:37 ` Eric Abrahamsen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).