- 论坛徽章:
- 0
|
大家好!
我在尝试使用Google Calendar的短信提醒功能,使用的是Net::Google::Calendar。不知道版上有用过的朋友没有!
我目前碰到一个问题, 就是使用文档中介绍的reminder无法设置短信提醒。我先说一下我的操作步骤,首先是建立一个entry, 然后添加到calendar中,成功后使用reminder。 程序执行后,我登陆Google Calendar,在页面上发现事件添加进来了,唯独短信提醒功能没有加进来, 下面是代码片段。 请教用过的朋友能指点一二, 在网络上几乎搜不到使用reminder的example。- my $entry = Net::Google::Calendar::Entry->new();
- my $title = "程序检测出网络运行错误";
- $entry->title(decode("gbk",$title));
- $event_descrip = "网络运行错误,详情请查收电子邮件";
- $entry->content(decode("gbk",$event_descrip));
- $entry->status('confirmed');
- $entry->when(DateTime->now(time_zone=>'local') + DateTime::Duration->new( minutes => 10 ), DateTime->now(time_zone=>'local') + DateTime::Duration->new( minutes => 15 ) );
- my $time = DateTime->now(time_zone=>'local') + DateTime::Duration->new( minutes => 1 );
- $entry->reminder('sms','minutes',$time);
- my $tmp = $calendar->add_entry($entry);
- die "$tmp is null." if !defined $tmp;
复制代码 |
|