Toon posts:

PHP | Outlook Appointment als mail attachement?

Pagina: 1
Acties:

Verwijderd

Topicstarter
Just a freak of the mind... met PHP mail versturen waar een Outlook Appointment als attachment bij zit, zou dat mogelijk kunnen zijn?

  • chem
  • Registratie: Oktober 2000
  • Laatst online: 27-08 13:53

chem

Reist de wereld rond

ja, als jij die file ergens 'hebt' dan kan je die attachen...

Klaar voor een nieuwe uitdaging.


  • TweakersOnly
  • Registratie: September 2000
  • Laatst online: 15:38
Dit moet ook met PHP mogelijk zijn. de broncode voor ASP is:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
dim Bestandsobject, ICSFile, begin, einde
set Bestandsobject = Server.CreateObject("Scripting.FileSystemObject")
set ICSFile = Bestandsobject.CreateTextFile("Appointment.vcs")

begin = "DTSTART;VALUE=DATE:" & Year(CDate(objRS("Begindatum")))
IF (Month(CDate(objRS("Begindatum"))) < 10) THEN
   begin = begin & "0"
END IF
begin  = begin & Month(CDate(objRS("Begindatum")))
IF (Day(CDate(objRS("Begindatum"))) < 10) THEN
   begin = begin & "0"
END IF      
begin = begin & Day(CDate(objUSER("Begindatum"))) & "T060000Z"

einde = "DTEND;VALUE=DATE:" & Year(CDate(objRS("Einddatum")))
IF (Month(CDate(objRS("Einddatum"))) < 10) THEN
   einde = einde & "0"
END IF
einde  = einde & Month(CDate(objRS("Einddatum")))
IF (Day(CDate(objRS("Einddatum"))) < 10) THEN
   einde = einde & "0"
END IF      
einde = einde & Day(CDate(objRS("Einddatum"))) & "T200000Z"

ICSFile.WriteLine("BEGIN:VCALENDAR")
ICSFile.WriteLine("PRODID:-//Microsoft Corporation//Outlook 9.0 MIMEDIR//EN")
ICSFile.WriteLine("VERSION:1.0")
ICSFile.WriteLine("BEGIN:VEVENT")
ICSFile.WriteLine(begin)
ICSFile.WriteLine(einde)
ICSFile.WriteLine("LOCATION;ENCODING=QUOTED-PRINTABLE:Locatie")
ICSFile.WriteLine("SUMMARY;ENCODING=QUOTED-PRINTABLE:Onderwerp van de appointment")
ICSFile.WriteLine("END:VEVENT")
ICSFile.WriteLine("END:VCALENDAR")
MailHandler.AddAttachment("Appointment.vcs")

Moet je alleen de code ff omzetten naar PHP.

Edit: Er wordt in bovenstaand voorbeeld op de server een *.vcs bestand gemaakt, welke na verzending kan worden verwijderd.

Verwijderd

Topicstarter
ok, thanx, hier heb ik vast wat aan!