-
Notifications
You must be signed in to change notification settings - Fork 0
/
JobAppw.pl
72 lines (58 loc) · 1.82 KB
/
JobAppw.pl
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
my ( $ref, $email, $line, $cc,, $speil, $subject, $url, @buff );
my $file = "C:\\temp\\job.txt";
my $temp = "C:\\temp\\temp_job.txt";
# my $cv = "P:\\usr\\My Documents\\ITConsultant\\Questor\\Career\\fjbcv.pdf";
# my $cv = "P:\\usr\\My Documents\\ITConsultant\\Questor\\Career\\fjbcv.doc";
my $cv = "v:\\_data\\fjbcv.doc";
my $user = "web99p1";
my $pass = "opytri31bm";
$spiel = <<EOS
Hi, I am very interested.
I have very relevant experience to this post; see attached CV.
Please call me now to progress this application.
Regards,
Farley
---
Farley Balasuriya
Microsoft IPTVe Solutions Consultant, MCSE, MCDBA, MS SMS MCP, CNE
--- job ---
EOS
;
#start of the script
open( JOB, $file ) or die "$! - can't open $file ";
if ( !-r $cv ) { die "Cannot find CV file: $cv" }
while (<JOB>) {
if (/^Ref: (.*)$/i) {
$ref = $1;
print "Ref: $ref\n";
}
if (/^Email\s*(.*)$/i) {
$email = $1;
print "Email: [$email]\n";
}
if (/^Reference\s*(.*)$/i) {
$subject = $1;
print "Subject: $subject\n";
}
if (/Full Job: (.*)$/i) {
$url = $1;
print "URL: $url\n";
}
push ( @buff, $_ );
}
close(JOB);
$subject = "Job Application: " . $subject ;
open( NEW, ">" . $temp ) or die "cannot create: $temp";
print NEW "$spiel\n", @buff;
close(NEW);
print "Sending Email and attaching CV...\n";
#copy for me - without the CV - Create Outlook rule to file automatically - I don't want to even see this shit!
system( "blat.exe",
"$temp -u $user -pw $pass -f contracts\@questor.ch -to contracts\@questor.ch -subject \"$subject\""
);
#copy for them - all the trimmings
system( "blat.exe",
"$temp -u $user -pw $pass -f contracts\@questor.ch -to \"$email\" -subject \"$subject\" -attach \"$cv\""
);
# print "Starting FireFox with the url: $url\n";
# system( "ff", "$url" );