link text in sendMail

Discussion in 'Perl Misc' started by Jaks, Jan 12, 2007.

  1. Jaks

    Jaks Guest

    I have the following code in a sub sendMail

    $link1 =

    $link2 =

    print MAIL "
    I would like $link1 to be my primary address

    I would like $link2to be my primary address";

    close (MAIL);

    In the generated email the following text is displayed

    I would like
    to be my primary address.

    How do I get the link text to be displayed as the address ie

    I would like Banbridge to be my primary address.

    Any help would be much appreciated.

    Jaks, Jan 12, 2007
    1. Advertisements

  2. Jaks

    tfe Guest

    Jaks ha escrito:

    You should extract the email adress from the variables $link1 and
    $link2 and then lines like:
    <a href="$link1">$real_email_adress</a>

    An idea of code is:
    print MAIL "I would like <a href=\"$link1\">".
    ($link1 =~ /mailto:(.+?)\@/)[0].
    .."</a> to be my primary address. ";
    tfe, Jan 12, 2007
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.