Questions tagged [rfc2822]

Standard syntax for text messages sent between computer users, within the framework of "electronic mail" messages.

This RFC replaces RFC822 and has been deprecated in favor of RFC5322.

It should be noted that this standard only specifies a syntax for text messages and does not cover the exchange of multimedia in emails (this being covered by MIME documents [RFC2045, RFC2046, RFC2049]).

It should also be noted that, while emails consist of both an envelop and the content, this RFC does not cover the envelop (see [RFC2821] for discussion on the envelop).

References: http://tools.ietf.org/html/rfc2822

63 questions
5
votes
2 answers

Why is Gmail rejected our emails as non-compliant with RFC 2822?

We use Mailgun to send out emails and recently I noticed quite a few emails each day are being rejected by Gmail. Here's the type of message we receive: 550 5.7.1 [184.173.153.6 11] Our system has detected that this message is 5.7.1 not RFC…
Desmond Weindorf
  • 268
  • 3
  • 11
5
votes
2 answers

Forcing "+0000" timezone for RFC2822 times in Ruby

How can I force the Time.rfc2822 function to spit out +0000? Ruby lets me parse RFC2822 formatted times pretty easily: require 'time' time = Time.parse('14 Aug 2009 09:28:32 +0000') puts time => "2009-08-14 05:28:32 -0400" But what about displaying…
Bkkbrad
  • 3,087
  • 24
  • 30
5
votes
1 answer

What are special characters in E-Mail-Headers and when to use quotes?

I'm trying to send and read e-mail using PHP. So far I found out that I have to encode special characters using the function mb_encode_mimeheader(), but I don't have to encode spaces. I also found out that brackets in address-field don't work: (Is…
R_User
  • 10,682
  • 25
  • 79
  • 120
4
votes
2 answers

RFC2822 datetime format to a usable datetime in SQL server

I am receiving a datetime in the following format: Thu, 18 Mar 2021 10:37:31 +0000 If I'm correct this if RFC2822. I can't figure out a way to convert this to a 'normal' datetime that would be used by SQl server. For example I want it to…
Romy Bos
  • 63
  • 6
4
votes
2 answers

Is there a good Haskell library that parses RFC2822 mail payloads?

I'm looking for a Haskell library that can parse RFC2822 email bodies to extract the content, including attachments. The only one I see is Text.ParserCombinators.Parsec.Rfc2822 from the hsemail package, but the author warns that it is not entirely…
dan
  • 43,914
  • 47
  • 153
  • 254
3
votes
1 answer

How do I parse a date from RFC2822 allowing a time zone at the end of the string?

I am trying to parse mail headers. I am trying to parse the date with Chrono, by giving it the RFC2822 strings. The problem is that it is not able to parse strings on the format 2 Nov 2021 14:26:12 +0000 (UTC), where the problem seems to be the last…
fevar
  • 107
  • 6
3
votes
1 answer

How to understand these email header fields? ("From" field prefixed with a "greater" sign)

I have a raw email with headers that look like this: From xxxx@xxxx Fri Apr 25 22:46:08 2003 >From xxxx@mxxxx Wed Feb 19 20:06:07 2003 Envelope-to: yyyy@xxxx ... Date: Wed, 19 Feb 2003 22:05:59 +0500 From: "Actual Author" I don't know…
Alex B
  • 82,554
  • 44
  • 203
  • 280
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

Swift_RfcComplianceException on valid email address, works in Windows not in Ubuntu

I'm running into what appears to be a rather infamous issue with SwiftMailer: Fatal error: Uncaught exception ‘Swift_RfcComplianceException’ with message ‘Address in mailbox given [noreply@host.com] does not comply with RFC 2822, 3.6.2.’ The…
Sean Quinn
  • 2,131
  • 1
  • 18
  • 48
3
votes
2 answers

RFC 2822 email address parsing - any good list of test cases?

I'm developing an RFC 2822 address parser (not a validator), and was wondering if anyone knew of a good list of test cases that exercises corner cases that might crop up? The specification of the address format is quite complex, and I'm not…
Jules
  • 14,841
  • 9
  • 83
  • 130
2
votes
3 answers

converting javascript regex to php preg_match

I'm building a contact form using PHP with jQuery validation and I wanted them both to have the same email pattern. I looked into the Validation plugin source code and found…
gavsiu
  • 757
  • 5
  • 9
  • 27
2
votes
1 answer

I got error Recipient address required with Gmail API

I want to send an email with Gmail API. Document say Gmail API require RFC2822 formatted and base64 encoded string. So I write email contents and pass it to raw property. But I got error: Recipient address required. How can I fix this? Here is…
invalid
  • 1,215
  • 4
  • 13
  • 30
2
votes
2 answers

Is an email address valid that passes validation but bounces?

I use the Zend_Validate_EmailAddress to validate email addresses for my email program. It validates according to the RFC2822 - http://framework.zend.com/manual/en/zend.validate.set.html My question is are these valid emails when they pass…
Etienne Marais
  • 1,660
  • 1
  • 22
  • 40
2
votes
1 answer

Are SMTP Message-Ids globally unique?

The RFC 2822(https://www.rfc-editor.org/rfc/rfc2822) mentions that "The uniqueness of the message identifier is guaranteed by the host that generates it". My question is that can two SMTP messages have the same Message-Ids at any given point of…
2
votes
1 answer

Manipulate RFC 2822 email in javascript

I am creating a chrome extension which works with the gmail api. The email format followed is based on RFC 2822. I want to modify the email. Is there any standard library in javascript to manipulate the RFC 2822 compliant email?
ksb
  • 670
  • 8
  • 19