0
votes

I'm trying to generate an email containing an iCal event from my application, I'm testing the email in two google accounts: one from gmail and one from google apps.

When I'm getting the event in gmail ([email1]@gmail.com) the event is rendered like this with no problem:

enter image description here

But when I get it in my google apps account ([email2]@[domain].com) it's not rendered, I don't know if it is being interpreted but it just dont show me the event, it only shows a simple email with an attachment (invite.ics)

This is the email message that is being generated:

Delivered-To: [email2]@[domain].com Received: by 10.205.80.15 with SMTP id zs15csp100752bkb; Thu, 7 Mar 2013 17:12:25 -0800 (PST) X-Received: by 10.236.126.202 with SMTP id b50mr351212yhi.25.1362705145168; Thu, 07 Mar 2013 17:12:25 -0800 (PST) Return-Path: Received: from mail-gh0-f181.google.com (mail-gh0-f181.google.com [209.85.160.181]) by mx.google.com with ESMTPS id f43si3539773yhk.290.2013.03.07.17.12.24 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 07 Mar 2013 17:12:25 -0800 (PST) Received-SPF: neutral (google.com: 209.85.160.181 is neither permitted nor denied by best guess record for domain of app@[domain].com) client-ip=209.85.160.181; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.160.181 is neither permitted nor denied by best guess record for domain of app@[domain].com) smtp.mail=app@[domain].com Received: by mail-gh0-f181.google.com with SMTP id y8so186664ghb.26 for <[email2]@[domain].com>; Thu, 07 Mar 2013 17:12:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:message-id:mime-version:from:to:date:subject :content-type:x-gm-message-state; bh=WkTwznIOK5D42bFC8nOzJjgv3+K9EWlBJWKv1ejbN9w=; b=n8BuYosOIOzxX28UkvX71UjVR9gFK00+9vixzoImOEvRKSvCimOPf1nvcpZR3AMShv rl/0ahNmVoDJ0ypjTiqA/fRZazf2M65SWJih/MGJuYmhzpyTpf371Z8NI65sAAGMvB0w KIaKl3kybyuS1TxysalZ/ZssN1vf2BT9T5Y5vVR+uAzBeAmtxZap733ZEn+Z+UvHQmOL twu64kvR/6TSWLFZgrtkGdKC8Gcet4CGeXQd/qKg0ZjpFPNXmuDXeqIz6Ftouuu7fFhd ms30c9l6zaexmpbFCCiZdtuwIfMKFjPuMnqtT6KcucDWmTTgu8LbBqNqdV5icFkrrCM2 LnTQ== X-Received: by 10.236.138.162 with SMTP id a22mr309438yhj.80.1362705144570; Thu, 07 Mar 2013 17:12:24 -0800 (PST) Return-Path: Received: from escobar5-pc ([181.133.180.140]) by mx.google.com with ESMTPS id w2sm5267588yhh.7.2013.03.07.17.12.22 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 07 Mar 2013 17:12:23 -0800 (PST) Message-ID: <[email protected]> MIME-Version: 1.0 From: "app" To: "user" <[email2]@[domain].com>, [email1]@gmail.com Date: Thu, 07 Mar 2013 17:12:23 -0800 (PST) Subject: Invitation: Test 9 Content-Type: multipart/alternative; boundary=--boundary_0_9e5fb21c-1a19-477c-a576-04176397fb67 X-Gm-Message-State: ALoCoQmdferSoIzk/zUGmI9SEnioj6H76AOGmK/HVLGAaL29QjhGXVj8Z9VuAewe0N38zdOEVvTH

----boundary_0_9e5fb21c-1a19-477c-a576-04176397fb67 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: base64

TWVldGluZzogVGVzdCA5DQpPcmdhbml6ZXI6IGpzZXNjb2JhckBiaW9hbnl3aGVyZS5j b20NClN0YXJ0IHRpbWU6IFRodXJzZGF5LCBBcHJpbCA0LCAyMDEzIDE6MDA6MDAgQU0N CkVuZCB0aW1lOiBUaHVyc2RheSwgQXByaWwgNCwgMjAxMyAyOjAwOjAwIEFNDQoNCkF0 dGVuZGVlczogDQoJLWpzZXNjb2JhckBiaW9hbnl3aGVyZS5jb20NCgktanNlc2NvYmFy NUBnbWFpbC5jb20NCg0KRGVzY3JpcHRpb246IHNkZmRzZmRzZnMNCkxvY2F0aW9uOiBC aW9tZWV0aW5ncw0K ----boundary_0_9e5fb21c-1a19-477c-a576-04176397fb67 Content-Type: text/html; charset=UTF-8 Content-Transfer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5fb21c-1a19-477c-a576-04176397fb67 Content-Type: text/calendar; method=REQUEST; charset=UTF-8 Content-Transfer-Encoding: 7bit

BEGIN:VCALENDAR PRODID:-//Google Inc//Google Calendar 70.9054//EN VERSION:2.0 CALSCALE:GREGORIAN METHOD:REQUEST BEGIN:VEVENT DTSTART:20130404T010000Z DTEND:20130404T020000Z DTSTAMP:20130308T011216Z ORGANIZER;mailto:[Email2]@[domain].com UID:event_36@[domain].com ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;X-NUM-GUESTS=0:mailto:[email2]@[domain].com ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;X-NUM-GUESTS=0:mailto:[email1]@gmail.com CREATED:20130308T011154Z DESCRIPTION:sdfdsfdsfs LAST-MODIFIED:20130308T011154Z LOCATION:Somewhere SEQUENCE:0 STATUS:CONFIRMED SUMMARY:Test 9 TRANSP:OPAQUE END:VEVENT END:VCALENDAR

----boundary_0_9e5fb21c-1a19-477c-a576-04176397fb67--

2
The VCALENDAR section has the proper new lines, they just get trimmed when I pasted it here. - Escobar5

2 Answers

0
votes

Well, do you get any invitation to display correctly in this second account (e.g. an invitation from the first account or from MSFT Outlook) ?

The above message looks just fine but may want to try the following MIME structure.

content-type:multipart/mixed
      content-type:multipart/alternative
          essentially the 3 mime parts that you already have above
      content-type:text/calendar
      Content-Disposition: attachment; filename="invite.ics"
          the ics invitation (again)
0
votes

I changed METHOD:REQUEST for METHOD:PUBLISH in the ical text and now it shows me the event in both accounts, it doesn't get automatically added to google calendar but at least it's showing in gmail message