Hi all,
i want to create a vcs file. when i am creating the vcs file it is
getting creatd in the server as well as in the local drive. But i dont
want to the vcs file to be saved in the serve. when i am trying to
delete the file from the server it is throwing the error,"Cannot start
Microsoft Outlook.Cannot import vCalendar file". here is the code that i
am using.
def vcs
f = File.open("txt_name.vcs","w+")
f.syswrite("BEGIN:VCALENDAR\n")
f.syswrite("PRODID:-//Microsoft Corporation//Outlook
MIMEDIR//EN\n")
f.syswrite("VERSION:1.0\n")
f.syswrite("BEGIN:VEVENT\n")
f.syswrite("DTSTART:20070105T210000Z\n")
f.syswrite("DTEND:20070105T230000Z\n")
f.syswrite("LOCATION:My office\n")
f.syswrite("CATEGORIES:Business\n")
f.syswrite("DESCRIPTION;ENCODING=QUOTED-PRINTABLE:This is a note
associated with the meeting\n")
f.syswrite("SUMMARY;ENCODING=QUOTED-PRINTABLE:Meeting to discuss
something unwanted !!\n")
f.syswrite("PRIORITY:3\n")
f.syswrite("END:VEVENT\n")
f.syswrite("END:VCALENDAR\n")
f.close
#value=StringIO.open("txt_name.vcs")
send_file File.ree''txt_name.vcs'', :type =>
''text/x-vCalendar'',
:disposition => ''attachment''
if(File.exists?("txt_name.vcs"))
File.delete("txt_name.vcs")
end
end
plz do help me out. thanks in advance.
regards,
john.
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---