rfc2822

Which date formats are IETF-compliant RFC 2822 timestamps?

て烟熏妆下的殇ゞ 提交于 2020-01-10 02:32:06
问题 I need to parse dates in JavaScript. The format is [2 digits day]/[2 digits month]/[4 digits year] [2 digits hour (24 mode)]:[2 digits minute] For example, 16/02/2013 21:00 But if I do new Date('16/02/2013 21:00').toString() , it gives 'Wed Apr 02 2014 21:00:00 GMT+0200 (Hora de verano romance)' . I guess that's because my dates don't follow IETF RFC 2822 Date and Time Specification. Then, I should convert my string, and I want to convert it to the most similar compliant format (because it

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

瘦欲@ 提交于 2020-01-04 02:26:06
问题 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 adress-filed don't work: (http://stackoverflow.com/questions/11989915/is-there-an-error-in-phps-imap-fetch-overview-function-when-reading-headers-w). For example PHP is unable to the header-section From: Admin [] <user@mail.tld> , but can read the header-section From: "Admin

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

自古美人都是妖i 提交于 2019-12-23 16:31:02
问题 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 message is being created with the following code (effectively): $message = \Swift_Message::newInstance() ->setSubject('Subject') ->setFrom(array('noreply@host.com' => 'Host')) ->setTo('recipient@gmail.com'); ... The odd thing is that the address: noreply

Converting string to datetime object

老子叫甜甜 提交于 2019-12-17 06:16:09
问题 I was trying to convert a string to a datetime object. The string I got from a news feed is in the following format: "Thu, 16 Oct 2014 01:16:17 EDT" I tried using datetime.strptime() to convert it. i.e., datetime.strptime('Thu, 16 Oct 2014 01:16:17 EDT','%a, %d %b %Y %H:%M:%S %Z') And got the following error: Traceback (most recent call last): File "", line 1, in datetime.strptime('Thu, 16 Oct 2014 01:16:17 EDT','%a, %d %b %Y %H:%M:%S %Z') File "C:\Anaconda\lib_strptime.py", line 325, in

How to send message to multiple recipients?

落爺英雄遲暮 提交于 2019-12-12 09:34:19
问题 I'm having some trouble sending a message to multiple addresses using the Gmail API. I've successfully sent a message to only one address, but get the following error when I include multiple comma-separated addresses in the 'To' field: An error occurred: https://www.googleapis.com/gmail/v1/users/me/messages/send?alt=json returned "Invalid to header"> I'm using the CreateMessage and SendMessage methods from this Gmail API guide: https://developers.google.com/gmail/api/guides/sending That guide

Parse RFC 2822 email addresses in Java

不打扰是莪最后的温柔 提交于 2019-12-10 15:57:29
问题 As many people are unaware, email addresses require a library to parse. Simple regexes, like @(.*) , are not sufficient. Email addresses can even contain comments, which can contain characters like @ , breaking simple regexes. There is a Node.js library that parses RFC 2822 addresses: var address = addresses[0]; console.log("Email address: " + address.address); console.log("Email name: " + address.name()); console.log("Reformatted: " + address.format()); console.log("User part: " + address

Is there a “no-reply” email header?

只愿长相守 提交于 2019-12-09 15:08:23
问题 I often see automated emails postfixed with a message like Amazon: *Please note: this e-mail was sent from an address that cannot accept incoming e-mail. Please use the link above if you need to contact us again about this same issue. Twitter: Please do not reply to this message; it was sent from an unmonitored email address. This message is a service email related to your use of Twitter. Google Checkout: Need help? Visit the Google Checkout help center. Please do not reply to this message.

How to send message to multiple recipients?

泪湿孤枕 提交于 2019-12-05 02:09:43
I'm having some trouble sending a message to multiple addresses using the Gmail API. I've successfully sent a message to only one address, but get the following error when I include multiple comma-separated addresses in the 'To' field: An error occurred: https://www.googleapis.com/gmail/v1/users/me/messages/send?alt=json returned "Invalid to header"> I'm using the CreateMessage and SendMessage methods from this Gmail API guide: https://developers.google.com/gmail/api/guides/sending That guide states that the Gmail API requires messages that are RFC-2822 compliant. I again didn't have much luck

Is there a “no-reply” email header?

帅比萌擦擦* 提交于 2019-12-04 01:38:33
I often see automated emails postfixed with a message like Amazon: *Please note: this e-mail was sent from an address that cannot accept incoming e-mail. Please use the link above if you need to contact us again about this same issue. Twitter: Please do not reply to this message; it was sent from an unmonitored email address. This message is a service email related to your use of Twitter. Google Checkout: Need help? Visit the Google Checkout help center. Please do not reply to this message. Directly underneath this warning, Gmail shows me a reply input field. It seems to me that there should

C# Email Regular Expression — Any out there that adhere to the RFC 2822 guidelines?

你。 提交于 2019-11-30 09:56:19
I realize that there are a ton of regex email validations, but I can't seem to find one that adheres to the RFC 2822 standard. The ones I find keep letting in junk like ..@abc.com get through. Forgive me if the one of the questions is already answered adhering to RFC 2822 (but not annotated that it is). I did a post on this a short while ago. Yes, it is possible using .NET regex, since they have a non-regular feature called " balancing groups ". The Perl RFC822 one that is often posted doesn't fully match email addresses, since it requires preprocessing to remove comments. It's also for a very