0
我一直在使用Grails 3.x,特别是使用邮件和iCalendar插件,我尝试将iCalendar事件附加到我的邮件服务,但它不起作用。如果有人能帮我修复我的代码,我将非常感激。那就是:将iCalendar事件附加到Grails中的邮件中
**这部分是我的iCalendar结构** https://github.com/saw303/grails-ic-alender
byte[] iCalendarFile
{
render(contentType: 'text/calendar')
{
calendar
{
events {
event(
start: new Date(),
end: new Date(),
description: 'Event',
summary: 'Some text here',
)
}
}
}
calendar.toString.getBytes('UTF-8')
}
**然后,我有我的电子邮件结构**
def mailService
def emailSender()
{
mailService.sendMail
{
multipart true
to correo
subject "Event"
body "Some text here"
attach "audiencia.ics", "text/calendar", iCalendarFile()
}
}
两个iCalendarFile和emailSender在相同的服务类。
感谢您的支持。 :)