rfc822

How do I elegantly print the date in RFC822 format in Perl?

How can I elegantly print the date in RFC822 format in Perl? ...

How do I parse and convert DateTime’s to the RFC 822 date-time format?

How do I convert a DateTime structure to its equivalent RFC 822 date-time formatted string representation and parse this string representation back to a DateTime structure? The RFC-822 date-time format is used in a number of specifications such as the RSS Syndication Format. ...

two questions (RFC822, login info) about sending email via python

1 - In my email-sending script, I store spaced-out emails in a string, then I use ", ".join(to.split()). However, it looks like the script only sends to the 1st email - is it something to do with RFC822 format? If so, how can I fix this? 2 - I feel a bit edgy having my password visable in my script. Is there a way to retrieve this in...

Stumped on C# DateTime ToString() formatting problem

I am getting some junk data returned from a ToString() call on a DateTime object in C# and I'm afraid I'm stumped after poking around with it for a while. The function is supposed to format dates to be compliant with RFC 822 (as required by the RSS spec) and looks like: public static string FormatPubDate(DateTime pubDate) { string...

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 times? Notice that the time it parsed is a local time. No worries, I can convert it ...

RFC-32 Date format to Short Date (MM/DD/YYYY) with ASP Classic

I'm not a strong ASP Classic developer, but I am tasked with supporting this application at work, well I've been trying to convert an RSS feed date to a short date format. And I cannot seem to find a solution. I have this format: Wed, 10 Jun 2009 12:46:13 +0000 and I need to get it into this format: 06/10/2009 So far I have been t...

How can I get an email message's text content using python?

Given an RFC822 message in Python 2.6, how can I get the right text/plain content part? Basically, the algorithm I want is this: message = email.message_from_string(raw_message) if has_mime_part(message, "text/plain"): mime_part = get_mime_part(message, "text/plain") text_content = decode_mime_part(mime_part) elif has_mime_part...

How do I convert RFC822 to a python datetime object?

I know how to do this the other way around... it would be: >>> dt.rfc822() 'Sun, 09 Mar 1997 13:45:00 -0500' ...

smtp: why does email needs envelope and what does the envelope mean

What is the exact difference between the envelope and the email in smtp? Why does the protocol need the envelope? In snail mail, the letter needs not contain addresses and is not visible to the postman (at least that's what you want to believe), so all the routing is made entirely based on the envelope and that is clear to me. However ...

How do I convert a mySQL timestamp into RFC-822 using Perl?

I have data stored in a mySQL table under the column type "timestamp" that I would like to output as an RFC-822 compliant date, for inclusion in a valid RSS feed. I know how I could simply output the current time as an RFC-822 object using perl, but I haven't figured out how to convert an existing string. The string is formatted like...

DateTime to RFC-1123 gives inaccurate timezone

If I get the RFC-1123 formatted date of a DateTime object, it gives the current local time, but gives the timezone as GMT (which is inaccurate). DateTime.Now.ToString("r"); returns Fri, 12 Feb 2010 16:23:03 GMT At 4:23 in the afternoon, but my timezone is UTC+10 (plus, we're currently observing daylight saving time). Now, I can get a r...

How to get the recipient address of an email via IMAP in Ruby

We have a user whose mail account is deluged with spam. I'm suspecting that he fields a large number of email accounts and therefore is subject to more than he might be with only one or two addresses. I want to knock up some code which will scan his mailbox and report on the number of addresses that were mailed to (ideally the ones whic...

How can I parse raw email source and extract the HTML part?

In my iPhone app, I'm handed the raw source of an email, in RFC822 (or "eml") format. I'd like the HTML part of this message (if one exists). Rather than attempting to parse it out myself and converting escape chars and so on, I thought I'd check to see if anyone knows of an objective-c library to do this for me. In .NET, I've always u...

How do I elegantly print the %z (timezone) format in Perl on Windows?

An offshoot of http://stackoverflow.com/questions/172110/how-do-i-elegantly-print-the-date-in-rfc822-format-in-perl, but Windows specific. On windows: C:\> perl -MPOSIX print strftime('%z', localtime()),"\n"; Yields: Central Daylight Time I was expecting: -0500 As anyone would on a Linux system. How can I get th...

RFC822 Timezone Parsing in Java

Hi, I have a JS date that is being converted by Dojo into RFC822 format. The function call - dojo.date.toRfc3339(jsDate), generates the following date - 2007-02-26T20:15:00+02:00. I have an application that uses a Java date SimpleDateFormat to parse in the dates generated above. I am having problems parsing this date format due to th...

Parsing an RFC822-Datetime in .NETMF 4.0

I have an application written in .NETMF that requires that I be able to parse an RFC822-Datetime. Normally, this would be easy, but NETMF does not have a DateTime.parse() method, nor does it have some sort of a pattern matching implementation, so I'm pretty much stuck. Any ideas? EDIT: "Intelligent" solutions are probably needed. Par...

MIME RFC "Content-Type" parameter confusion? Unclear RFC specification.

Hello, I'm trying to implement a basic MIME parser for the multipart/related in C++/Qt. So far I've been writing some basic parser code for headers, and I'm reading the RFCs to get an idea how to do everything as close to the specification as possible. Unfortunately there is a part in the RFC that confuses me a bit: From RFC882 Sectio...

Re-assemble email messages encoded in 'message/partial' with Python

Is there a way to reassemble in Python email messages that are encoded with Content-Type: message/partial (i.e. section '7.3.2. The Message/Partial subtype' of RFC 1521)? In particular, given a set of emails, how can one merge them back into an original? i.e. emails = [...] # a list of `email`. reassembled_email = merge_emails(emails...

Saxon XSLT 2.0 and RFC 822 date format

Hi, What is the right way to format xs:dateTime to RFC 822? ...