2012-03-16T09:34:47
KeanIch möchte also keine empfangenen Emails öffnen sondern ein neues Emailfenster mit einem Betreff und Text zum versenden öffnen.
Wenn ein Standard-Mailclient für das mailto: Protokoll registriert ist, hilft Dir
Win32::API:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
use warnings;
use strict;
use Win32::API;
my $ShellExecute = new Win32::API(
'shell32',
'ShellExecuteA',
[ qw( N P P P P I ) ],
'N'
);
my $recipient = 'foo@example.com';
my $subject = 'Hello World';
my $body = '... funktioniert :)';
$ShellExecute->Call(
0,
'open',
'mailto:' . $recipient . '?subject=' . $subject . '&body=' . $body,
0,
0,
1
);
Gruß FIFO
Nachtrag: Attachments gehen so allerdings nicht.
Editiert von FIFO: typo
Editiert von FIFO: Nachtrag
Last edited: 2012-03-16 13:38:24 +0100 (CET)
Everyone knows that debugging is twice as hard as writing a program in the first place. So if you're as clever as you can be when you write it, how will you ever debug it? -- Brian Kernighan: "The Elements of Programming Style"