boboson has asked for the wisdom of the Perl Monks concerning the following question:
I am calling the sendMail sub from another sub with the following data:#this is my sub for sending the email sub sendMail{ # application object my $self = shift; # get arguments my ($to, $from, $subject, $text) = @_; open (MAIL, "|/usr/lib/sendmail -t -oi") or die("Can not find sendmail: $!"); print MAIL <<_MAIL_; Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable To: $to From: $from Cc: Subject: $subject $text _MAIL_ close MAIL; }
There can be some smaller syntax error in the above code because I took it out from the bigger picture.my $from = "noreply\@xxxxxx.com"; my $subject = "Membership"; my $link = "http://www.xxxxxx.com/xxxxxx/index.cgi?rm=activate&id=$act +ivate_code&email=$email"; my $text = "<html><head><title></title></head><body><a href=\"$link\"> +$link</a></body></html>"; $self->sendMail($email, $from, $subject, $text);
I dont know where to start with my questions?sub URLEncode { my $theURL = $_[0]; $theURL =~ s/([\W])/"%" . uc(sprintf("%2.2x",ord($1)))/eg; return $theURL; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: email activation link
by timos (Beadle) on Mar 23, 2006 at 16:21 UTC | |
by boboson (Monk) on Mar 23, 2006 at 23:14 UTC | |
by Scott7477 (Chaplain) on Mar 23, 2006 at 19:14 UTC | |
by boboson (Monk) on Mar 23, 2006 at 20:34 UTC | |
by Anonymous Monk on Mar 24, 2006 at 00:08 UTC | |
|
Re: email activation link
by eric256 (Parson) on Mar 23, 2006 at 23:21 UTC |