I have been trying to write a script .
a mobile number is entered into a form which is sent to the script,
The script removes the leading 0 then
adds a +44 in front and
tacks a @domain.com onto the end.
Then it saves this new number/email to a txt file and automatically sends out
an e-mail to the +44 (some number)@domain.com e-mail address.
Here is as far as i have got.. Any ideas or help appreciated.
#!/usr/bin/perl -w
$newvar = substr($variable, offset);
$newvar = "+44" . $variable . "\@domain.com";
unless (open(MAIL, "|/path/to/sendmail -t")) {
die(" Failed to talk to sendmail\n");}
print MAIL <<"MAIL1";
To: $recipient
From: $sender
Subject: $subject
$message
MAIL1