ravin
05-14-2008, 10:42 AM
Hello,
I never used perl before but it seems like I need it!
Im using Apache under win32 with perl?
Here is some info from my phpinfo()
PCRE (Perl Compatible Regular Expressions) Support enabled
PCRE Library Version 6.7 04-Jul-2006
Loaded modules : mod_mime
mime_magic support : off
I also have C:\Program Files\xampp\perl\bin\perl.exe
Here is the code I found,
#!/usr/bin/perl -w
use strict;
use MIME::Lite;
my $msg = MIME::Lite->new(
From =>'edwin@mavetju.org',
To =>'administrator@example.org',
Subject =>'Join me!',
Type =>'multipart/alternative'
);
$msg->attr(
'content-class' => 'urn:content-classes:calendarmessage'
);
$msg->attach(
Type => "TEXT",
Data => "foo bar quux"
);
my $part = MIME::Lite->new(
Type => "text/calendar; method=REQUEST; name=\"subject.ics\"",
Filename => "subject.ics",
Path => "subject.ics",
Encoding => "8bit",
);
$part->scrub(['date', 'x-mailer', 'mime-version']);
$part->attr(
'content-class' => 'urn:content-classes:calendarmessage',
'content-description' => "subject.ics",
);
$part->replace(
'content-disposition' => "",
);
$msg->attach($part);
$msg->send;
It is a code for sending out a Microsoft Outlook Calender invitation.
How can I use this from a website? And how is it written in a php file? I´ll use different variables each time, from mysql database.
Any ideas? :)
I never used perl before but it seems like I need it!
Im using Apache under win32 with perl?
Here is some info from my phpinfo()
PCRE (Perl Compatible Regular Expressions) Support enabled
PCRE Library Version 6.7 04-Jul-2006
Loaded modules : mod_mime
mime_magic support : off
I also have C:\Program Files\xampp\perl\bin\perl.exe
Here is the code I found,
#!/usr/bin/perl -w
use strict;
use MIME::Lite;
my $msg = MIME::Lite->new(
From =>'edwin@mavetju.org',
To =>'administrator@example.org',
Subject =>'Join me!',
Type =>'multipart/alternative'
);
$msg->attr(
'content-class' => 'urn:content-classes:calendarmessage'
);
$msg->attach(
Type => "TEXT",
Data => "foo bar quux"
);
my $part = MIME::Lite->new(
Type => "text/calendar; method=REQUEST; name=\"subject.ics\"",
Filename => "subject.ics",
Path => "subject.ics",
Encoding => "8bit",
);
$part->scrub(['date', 'x-mailer', 'mime-version']);
$part->attr(
'content-class' => 'urn:content-classes:calendarmessage',
'content-description' => "subject.ics",
);
$part->replace(
'content-disposition' => "",
);
$msg->attach($part);
$msg->send;
It is a code for sending out a Microsoft Outlook Calender invitation.
How can I use this from a website? And how is it written in a php file? I´ll use different variables each time, from mysql database.
Any ideas? :)