Questions tagged [rfc822]

RFC822 is the historical original standard for the format of email messages.

RFC5322 (which supersedes 2822, which in turn superseded the original 822) defines the basic format of email messages. Its companion document RFC5321 documents the SMTP transport protocol.

These days, you also need to know about and the various internationalization features which have been added to the email infrastructure over the years.

The protocol is used for mail transport between servers; for mailbox access from clients, perhaps you need to look at and/or .

Resources:

See for more details on the Internet Engineering Task Force RFC (Request For Comments) documents and process.

128 questions
4
votes
1 answer

How do I parse an RFC822 date in .NET?

I have the following datetime string as returned to me by the Twitter API: "Thu Apr 26 11:38:36 +0000 2012" I need to convert this to a DateTime object so I call ParseExact with a custom format specifier: CultureInfo provider =…
ChrisF
  • 134,786
  • 31
  • 255
  • 325
3
votes
1 answer

Sorting dates stored as varchar/rfc822

Don't ask why (it's something out of my control), but dates are being stored as RFC-822 in our MySQL DB in varchar(125). RFC-822 = Mon Jun 13 2011 11:30:00 GMT-0400 (EDT) or Mon Jun 13 17:00:00 EDT 2011 Is there a way I can sort by date in that…
bafromca
  • 1,926
  • 4
  • 27
  • 42
3
votes
0 answers

Python email library - Parsing message/rfc822 attachments

I'm using python 2.7 and trying to parse emails that are being forwarded as an attachment to an inbox. I can't seem to parse the headers/email of the attached message. I see it as 'message/rfc822' but when i try to parse it, it shows empty. I pull…
callingconvention
  • 183
  • 1
  • 1
  • 8
3
votes
2 answers

Why do RECEIVED email headers seem to be out of order chronologically?

When reviewing the headers, it appears that the 2nd server to receive the message didn't relay it until AFTER the reported delivery date in the final header. At c9mailgw11.amadis.com, the reported time was 22:47:49 -0800 (PST). However, the final…
adamYWA
  • 43
  • 5
3
votes
1 answer

Is it valid to fold MIME headers at the beginning of field-body?

I'm debugging a MIME parser that fails to parse a header from one email service. The email service includes a header that consists of a field body entirely on the next line, like so: Message-Id: <12345.67890.abcdef@example.com> Is this…
Jesse Spears
  • 136
  • 9
3
votes
2 answers

Emails sent from mobile devices are strangely decoded using email lib

I'm using Python imaplib and email modules to grab a list of emails from smtp and do something with them afterwards. This is the snippet I'm using to grab and decode the emails: import imaplib import email # Connect to server box =…
Aitor Martin
  • 724
  • 1
  • 11
  • 26
3
votes
2 answers

Email Validation RFC 2821 using Java

I am working on email Validation using java having RFC 2821 in mind. I have used following code to validate all my email address: InternetAddress emailAddr = new InternetAddress(email); emailAddr.validate(); Java api says its RFC-822 compliant. Is…
3
votes
1 answer

Sort XML by RFC-822 date format using XSL

Does anyone know of a way to do this kind of sorting in XSL? Here's what I have so far but it only sorts by day and ignores the rest of the date.
AdamRox
  • 85
  • 9
2
votes
1 answer

What is the difference between an `eml` file and an RFC822 email message?

I see these two terms used interchangeably in a lot of context, but some sources say that eml is a file format that originated with Microsoft Outlook. Is eml the official file suffix of an RFC822 message saved as a flat text file?
dan
  • 43,914
  • 47
  • 153
  • 254
2
votes
0 answers

How to use javax.mail.internet.MimeBodyPart.setFileName to keep all characters?

I need to create mails using javax.mail version 1.6.2 and would like to stick to high level methods as much as possible and would like to avoid dealing myself with character encoding, folding and whatever is necessary to get a valid mail in the…
Thorsten Schöning
  • 3,501
  • 2
  • 25
  • 46
2
votes
1 answer

Convert an attachment of Content-type "message/rfc822" to .msg file

I am using apache's MimeMessageParser to get a MimeMessage. It has another Email type attachment that has body content and inline images. I was able to fetch the email attachment from mimeMessage and I could convert it to .msg file successfully.…
dev_code
  • 33
  • 1
  • 3
2
votes
1 answer

Perl MIME::Parser and encoding in nested bodys (message/rfc_822)

arghhh, it's not easy. I'm trying to parse some mails with perl. Let's take an example: From: abc@def.de Content-Type: multipart/mixed; boundary="----_=_NextPart_001_01CBE273.65A0E7AA" To: ghi@def.de This is a multi-part message in MIME…
rabudde
  • 7,498
  • 6
  • 53
  • 91
2
votes
3 answers

What should I change the pattern to validate?

I must validate two types of expressions for an email: letter.letter.year greater than 2018@uts.edu.co j.g.2019@uts.edu.co 0-2018.letter.letter@*.com.co 0.j.g@cloudmail.com.co I have used these two regex expressions but they have not…
2
votes
3 answers

How can I convert an RFC 822 timestamp into a human readable format in Python?

Does anyone know of a Python module that will convert an RFC 822 timestamp into a human readable format (like Twitter does) in Python? I found parsedatetime, which seems to do the reverse.
Sean W.
  • 4,944
  • 8
  • 40
  • 66
2
votes
1 answer

Convert RFC 822 timestamp to unixtime, timezone values not working , C/C++

I've a function which converts an RFC 822 timestamp to unixtime #include #include int main() { struct tm tm; time_t unixtime; strptime("Sun, 20 Feb 2011 10:28:02 +0800","%a, %e %h %Y %H:%M:%S %z",&tm); unixtime =…
Nands
  • 1,541
  • 2
  • 20
  • 33
1 2
3
8 9