iCalendar Valarm doesn't work - icalendar

I generate iCal file like this:
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Splash//EN
BEGIN:VEVENT
DTSTART;VALUE=DATE:20150912
DTEND;VALUE=DATE:20150912
SUMMARY:test
DESCRIPTION:xxx
BEGIN:VALARM
ACTION:DISPLAY
DESCRIPTION:test
TRIGGER:-P0DT16H0M0S
END:VALARM
BEGIN:VALARM
ACTION:DISPLAY
DESCRIPTION:test
TRIGGER:-P1DT16H0M0S
END:VALARM
BEGIN:VALARM
ACTION:DISPLAY
DESCRIPTION:test
TRIGGER:-P2DT16H0M0S
END:VALARM
END:VEVENT
END:VCALENDAR
And when i import this file with google calendar import is successful but i don't have reminders so what i do wrong with VALARM and how can I fix this?

Your icalendar file does not validate, it is missing the UID at DTSTAMP properties. Try adding those properties and see if the alarms work.
iCalendar Validator

Related

how to host and export my availability ics calendar and sync it to other hosts like booking.com or homeaway?

I am using my own selfmade php calendar. Every time I update the calendar, an ics file is created and placed in the "ical" directory on my server under the name "24633.ics". I can import the file into my Google calendar, but it fails on other booking websites. The file complies with the ics standards. What went wrong? What are the requirements for the calendar or server to import the file from booking websites?
Address: https://www.fewo4rent.de/ical/24633.ics
The calendar itself:
BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
PRODID:-//fewo4rent.de//DE
BEGIN:VEVENT
UID:1667560674-20221105-74919
DTSTAMP:20221104T121754Z
DTSTART;VALUE=DATE:20221105
DTEND;VALUE=DATE:20221112
SUMMARY:Belegt
END:VEVENT
BEGIN:VEVENT
UID:1667560674-20221127-59384
DTSTAMP:20221104T121754Z
DTSTART;VALUE=DATE:20221127
DTEND;VALUE=DATE:20221203
SUMMARY:Belegt
END:VEVENT
BEGIN:VEVENT
UID:1667560674-20221210-96485
DTSTAMP:20221104T121754Z
DTSTART;VALUE=DATE:20221210
DTEND;VALUE=DATE:20221224
SUMMARY:Belegt
END:VEVENT
BEGIN:VEVENT
UID:1667560674-20230715-55753
DTSTAMP:20221104T121754Z
DTSTART;VALUE=DATE:20230715
DTEND;VALUE=DATE:20230805
SUMMARY:Belegt
END:VEVENT
END:VCALENDAR
The headers:
header('Content-type: text/calendar charset=UTF-8');
header('Content-Disposition: attachment; filename='24633.ics')
or
header('Content-Disposition: inline; filename='24633.ics');
One website answers: "No reaction from the URL"

Thunderbird+Lightning is rendering an ics invitation inappropriately

Using sabre/vobject library I am creating an ics file like this one:
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Sabre//Sabre VObject 4.1.2//EN
CALSCALE:GREGORIAN
BEGIN:VEVENT
UID:sabre-vobject-d4b1ccb3-2197-4ee4-aab8-7bc2516adbf8
DTSTAMP:20170123T182612Z
SUMMARY:testev2
DESCRIPTION:
DTSTART;TZID=Europe/Athens:20170214T090000
DTEND;TZID=Europe/Athens:20170215T170000
LOCATION:
ORGANIZER;CN=Organizer Name:mailto:organizer#example.com
ATTENDEE;CN=Test User:MAILTO:test.user#somewhere.com
END:VEVENT
END:VCALENDAR
Then using phpmailer, I am attaching the file generated to an e-mail message and send it to the users who are participating on the event. Users who are using thunderbird (with Lightning extension - which is by default on) receive the e-mail message in the following format:
As you see in the picture the ics file is parsed and rendered in the table at the bottom of the e-mail. However the table header (the one marked in red) is not displaying correct information. Test user has not ever cofirmed his/her presence, and if he does, the ics file does not provide any info about it.
Am I formatting the ics file wrong?
Is it a known bug of thunderbird / Lightning ?
UPDATE
The e-mail headers of the message:
Return-Path: <XXXXXXXXXXXXXXXX>
Received: from deliver ([unix socket])
by mail (Cyrus v2.3.16-Fedora-RPM-2.3.16-13.el6_6) with LMTPA;
Tue, 24 Jan 2017 12:48:10 +0200
X-Sieve: CMU Sieve 2.3
Received: from [XXX.XXX.XXX.XXX] (XXXXXXXXXXXXXX [XXX.XXX.XXX.XXX
(using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits))
(No client certificate requested)
by XXXXXXXXXXXXXX (Postfix) with ESMTPSA id 6F18C1BE0305
for <XXXXXXXXXXXXXX>; Tue, 24 Jan 2017 12:48:10 +0200 (EET)
Subject: Fwd: Event invitation: testev2
To: "XXXXXXXX" <XXXXXXXXXXXXXX>
From: XXXXXXXXXXXXXX <XXXXXXXXXXXXXX>
X-Forwarded-Message-Id:
Message-ID: <bac7749e-9699-1b50-9de5-27a510c663a4#XXXXXXXX>
Date: Tue, 24 Jan 2017 12:48:09 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.6.0
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="------------79DD2A1D49F1A57579125B45"
This is a multi-part message in MIME format.
--------------79DD2A1D49F1A57579125B45
Content-Type: multipart/alternative;
boundary="------------72E56459CD6D794D0DF5AC4B"
--------------72E56459CD6D794D0DF5AC4B
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 8bit
> ------- Forwarded Message --------
Forward message content
> --------------72E56459CD6D794D0DF5AC4B
> Content-Type: text/html; charset=windows-1252
> Content-Transfer-Encoding: 8bit
>
HTML Content
> --------------72E56459CD6D794D0DF5AC4B--
>
> --------------79DD2A1D49F1A57579125B45
> Content-Type: text/calendar;
> name="invitation.ics"
> Content-Transfer-Encoding: 7bit
> Content-Disposition: attachment;
> filename="invitation.ics"
>
ICS Content
> --------------79DD2A1D49F1A57579125B45--
You should make the Content-Type of the ics attachment something like:
Content-Type: text/calendar; charset="utf-8"; method=REQUEST
The method option is the magic word. I'm not completely sure this works, but it is at least closer to the spec. I'm happy to update my answer if it doesn't work.

Outlook Autodiscover SMTP authentication

The problem
I am trying to create an autodiscover script for the users of my website. Currently I am creating a working connection to my mail-server, however my mail server requires SMTP authentication. I am currently sending:
<AuthRequired>on</AuthRequired>
in the full XML file to enable SMTP authentication. This enables the checkmark in the details next to "My outgoing server (SMTP) requires authentication". The bullet list with the two options "use same settings as my incoming mail server" (prefered) or "Log on using" has no option selected.
What I've tried
I have tried adding the POP3 information and putting the following attribute in my SMTP part:
<UsePOPAuth>on</UsePOPAuth>
However that did not work. To create the XML file I have used the following URL: https://technet.microsoft.com/en-us/library/cc511507.aspx
My current XML document
<Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/responseschema/2006">
<Response xmlns="http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a">
<Account>
<AccountType>email</AccountType>
<Action>settings</Action>
<Protocol>
<Type>IMAP</Type>
<Server>mail.test.nl</Server>
<Port>143</Port>
<DomainRequired>on</DomainRequired>
<LoginName>me#test.nl</LoginName>
<SPA>off</SPA>
<SSL>off</SSL>
<AuthRequired>on</AuthRequired>
</Protocol>
<Protocol>
<Type>SMTP</Type>
<Server>mail.test.nl</Server>
<Port>587</Port>
<DomainRequired>on</DomainRequired>
<LoginName>me#test.nl</LoginName>
<SPA>off</SPA>
<SSL>off</SSL>
<AuthRequired>on</AuthRequired>
<SMTPLast>on</SMTPLast>
</Protocol>
</Account>
</Response>
</Autodiscover>
I found a very useful article on TechNet which basically explains why this is happening. From what i understood, specifying the SMTPLast property makes Outlook attempt to login to POP/IMAP before SMTP, without actually authenticating SMTP (some servers such as my school's only work this way).
I reproduced the same problem you had with that config but once i removed it, it worked like a charm.
I noticed there isn't a lot of useful documentation about Autodiscover, aka POX autodiscover so here's the xml template that worked for me:
<Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/responseschema/2006">
<Response xmlns="http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a">
<User>
<DisplayName>First Last</DisplayName>
</User>
<Account>
<AccountType>email</AccountType>
<Action>settings</Action>
<Protocol>
<Type>IMAP</Type>
<Server>mail.example.com</Server>
<Port>993</Port>
<AuthRequired>on</AuthRequired>
<LoginName>email#example.com</LoginName>
<SPA>off</SPA>
<SSL>on</SSL>
</Protocol>
<Protocol>
<Type>SMTP</Type>
<Server>mail.example.com</Server>
<Port>587</Port>
<AuthRequired>on</AuthRequired>
<LoginName>email#example.com</LoginName>
<SPA>off</SPA>
<Encryption>TLS</Encryption>
<UsePOPAuth>on</UsePOPAuth>
</Protocol>
</Account>
</Response>
</Autodiscover>

iCal file not importing

I made a function in a python script that returns an ical file, but when I try to import it into busycal, it says "no events imported". I have checked and doublechecked, yet I can't find anything wrong with it. Here is a (short) example of such iCal file that doesn't work:
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Ben//classtoical
X-WR-CALNAME:Classes
X-WR-TIMEZONE:Europe/Berlin
BEGIN:VEVENT
DTSTAMP:20131129T141052Z
UID:20131129141052-50157600408285#mydomain.com
DTSTART;TZID=Europe/Berlin:20131204T18000
DTEND;TZID=Europe/Berlin:20131204T20000
SUMMARY:Contemporary Philosophy
LOCATION:F.4.113
END:VEVENT
BEGIN:VEVENT
DTSTAMP:20131129T141052Z
UID:20131129141052-79836541033229#mydomain.com
DTSTART;TZID=Europe/Berlin:20131202T18000
DTEND;TZID=Europe/Berlin:20131202T20000
SUMMARY:Logic and Philosophy of Science
LOCATION:E.2.01
END:VEVENT
END:VCALENDAR
I discovered the cause of the problem; the DTSTART and DTEND dates had only 1 zero to represent seconds instead of the required 2.
Original file:
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Ben//classtoical
X-WR-CALNAME:Classes
X-WR-TIMEZONE:Europe/Berlin
BEGIN:VEVENT
DTSTAMP:20131129T141052Z
UID:20131129141052-50157600408285#mydomain.com
DTSTART;TZID=Europe/Berlin:20131204T18000
DTEND;TZID=Europe/Berlin:20131204T20000
SUMMARY:Contemporary Philosophy
LOCATION:F.4.113
END:VEVENT
BEGIN:VEVENT
DTSTAMP:20131129T141052Z
UID:20131129141052-79836541033229#mydomain.com
DTSTART;TZID=Europe/Berlin:20131202T18000
DTEND;TZID=Europe/Berlin:20131202T20000
SUMMARY:Logic and Philosophy of Science
LOCATION:E.2.01
END:VEVENT
END:VCALENDAR
Working file:
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Ben//classtoical
X-WR-CALNAME:Classes
X-WR-TIMEZONE:Europe/Berlin
BEGIN:VEVENT
DTSTAMP:20131129T141052Z
UID:20131129141052-50157600408285#mydomain.com
DTSTART;TZID=Europe/Berlin:20131204T180000
DTEND;TZID=Europe/Berlin:20131204T200000
SUMMARY:Contemporary Philosophy
LOCATION:F.4.113
END:VEVENT
BEGIN:VEVENT
DTSTAMP:20131129T141052Z
UID:20131129141052-79836541033229#mydomain.com
DTSTART;TZID=Europe/Berlin:20131202T180000
DTEND;TZID=Europe/Berlin:20131202T200000
SUMMARY:Logic and Philosophy of Science
LOCATION:E.2.01
END:VEVENT
END:VCALENDAR

Amazon SES and Hotmail spam

I configured an email address with google apps for my company. When I send messages from Gmail to address#hotmail.com the message is received correctly in the inbox folder.
When I moved to Amazon SES, I configured correctly SPF and DKIM so that it may work fine. The big problem is that when I send from SES emails go allways into the spam folder!!!
This is the hotmail header of a message that is falled into the spam folder:
x-store-info:CnuewmGKkJzNjuOw4Ko28wB3rXpWYbsxTq8bIGVpexou/aH5YlneZSXtbrTNbKJ4GoT+OaKU2vnoHLIPY7tpJ7yfD4ei7NGnJPMqwC1IOiYDYaHi7z9UqM7HFUFg9PvdD/GTLm1Joes=
Authentication-Results: hotmail.com; spf=pass (sender IP is 54.240.8.95) smtp.mailfrom=0000014191bce21d-5857cbb3-7185-4a04-a62d-02029457d42b-000000#amazonses.com; dkim=pass header.d=beaudience.com; x-hmca=pass header.id=support#beaudience.com
X-SID-PRA: support#beaudience.com
X-AUTH-Result: PASS
X-SID-Result: PASS
X-Message-Status: n:n
X-Message-Delivery: Vj0xLjE7dXM9MDtsPTE7YT0xO0Q9MjtHRD0xO1NDTD00
X-Message-Info: 11chDOWqoTmYiARgB8x0CqssYC30R1hAxykCxY7lMqvPXk+fm44PmUeqp2eso9uKqBo8WFDhDk3rZsgJn8uSIHpUqpn7/N+/COouobxjVl2F7FiiDMh/AjlIDYLoKhZeWqATlTzu9cdwruznM5Eh3gOw+h4szTV5OcHunEoeFZeggqKm4r8Wd97fzBr3wpj6Xji14R+Xo8C7zTF5xkQAV15Ns/IGAE0R
Received: from a8-95.smtp-out.amazonses.com ([54.240.8.95]) by COL0-MC3-F51.Col0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4900);
Mon, 7 Oct 2013 00:06:18 -0700
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple;
s=fzsj4xlkgrzw4njd7a4n5dv47w5dmrc5; d=beaudience.com; t=1381129577;
h=Date:To:From:Reply-To:Subject:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding;
bh=d9cLexwYe6DbP7/N2SXpl7aOUi58tQ37WMdTDDTQtvA=;
b=rR0at2KyIFuhpI6HFSd56LbiVPS2uPzECnYlscb7UliQraxznWxjRKrDCF3HVNJj
1/s3xjXaOLoCLk0H0B8xa76KzWgMwtxDulEFn39G06yRd9/r/17xTYzQ/MpMMn9lUlv
VT75xxTBO7iwm8hZ4ntQtBsMnnvybLC89tAoVXNE=
Date: Mon, 7 Oct 2013 07:06:17 +0000
Return-Path: 0000014191bce21d-5857cbb3-7185-4a04-a62d-02029457d42b-000000#amazonses.com
To: luca.pennisi#live.com
From: support BeAudience <support#beaudience.com>
Reply-To: support#beaudience.com
Subject: We remember you!
Message-ID: <0000014191bce21d-5857cbb3-7185-4a04-a62d-02029457d42b-000000#email.amazonses.com>
X-Priority: 3
X-Mailer: PHPMailer 5.2.6 (https://github.com/PHPMailer/PHPMailer/)
MIME-Version: 1.0
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-SES-Outgoing: 2013.10.07-54.240.8.95
X-OriginalArrivalTime: 07 Oct 2013 07:06:18.0240 (UTC) FILETIME=[B83DF000:01CEC32B]
<html><head></head><body><b>Account
details:</b><p>username: tryHard<br />password:
porcodio</p><hr /><a
href="http://www.beaudience.com/joinus.php">Click
here to log-in</a><br /><br /><p>BeAudience
staff.</p></body></html>
I'm desperate, don't know what to do! I have configured SPF and DKIM but is useless! It not depends on the email content, I tried with different contents, html/non html but nothing to do with ses!!
It's not a problem on Amazon SES side, Microsoft filters are flagging your message based on multiple variables, like headers, content, domain age, etc.
That seems to be a Welcome Message, so the best way to go about it is to instruct the user to check the spam folder and mark the message as "not junk". Eventually and hopefully, Microsoft will learn from multiple user decisions and will start delivering your messages to the inbox.
Another advice, you are sending the message using PHPMailer. That header (X-Mailer: PHPMailer 5.2.6) may be triggering a flag on Microsoft side before even getting to your content.
I had the same problem. But I've fixed it. My steps:
add text/html version for mail;
check your html in email, make sure that is correct;
verify your domain in SES dashboard;