The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
|
![]() |
Sending an email with ical - Printable Version +- Form Tools (https://forums.formtools.org) +-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1) +--- Forum: General Discussion (https://forums.formtools.org/forumdisplay.php?fid=5) +--- Thread: Sending an email with ical (/showthread.php?tid=1812) |
Sending an email with ical - carpetman - Dec 13th, 2011 Hi everyone, One of my form emails sends an email to myself with booking information. I'm using Microsoft Outlook for my bookings calender which is syncronised with google so i can use it on the road. Desired improvement: What i want to do is send the message from formtools in the form of an ical file so when outlook picks it up it puts it straight in the diary. I had a go last month without sucess and i'm going to have another go this week now i understand how the form emails work (thanks Ben) but if anyone out there has already done this it would be helpful if you can provide some direction. Thanks Rob RE: Sending an email with ical - Ben - Dec 17th, 2011 Hey Rob, Cool idea... but no, I haven't heard of anyone doing this myself. I'll add this idea to the Feature Suggestions forum. In terms of direction, I'm really not sure... I don't know much about iCal from a technical perspective (though I'd sure used it enough). Sorry about that. - Ben RE: Sending an email with ical - carpetman - Dec 17th, 2011 I think i've got it Ben but i'll write the code in the new year as my other half will murder me if i spend anymore time on the computer ![]() With regards to the the calender file i'm going to put some code in so when a particular email is sent it creates a new iCal file with all the needed fields for outlook to read it properly and then populate the fields from the record that was selected when the email is sent. Then the file just needs to be sent as an attachment (i'm thinking of using swiftmailer as i believe you can send attachments with it easily). I'll let you know how i go but i got a feeling its going to be relatively easy now i have a plan ![]() RE: Sending an email with ical - carpetman - Dec 17th, 2011 ok i couldnt wait so i did an all nighter ![]() Before the email is sent i have some php code create a ics file on my server. It then writes all the ical fields and populates them with matching data from the record selected for the email by running a query on the formtools mysql database. I enabled swiftmailer and went to the email template and after a quick read of the swiftmailer documentation, I included the attach file statement that was kindly given as an example {$attachment file="../folder/anotherfile.txt"}. A quick edit and now everytime the email is sent it attaches the ics file. Works like a dream - each booking goes straight into my calender with no cutting and pasting ![]() If anyone else is interested i'd be happy to help. Rob RE: Sending an email with ical - Ben - Dec 19th, 2011 NICE!! Very nice indeed. ![]() |