Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

remove @ link from perl generated email

by raggmopp (Novice)
on Apr 21, 2012 at 02:10 UTC ( [id://966294]=perlquestion: print w/replies, xml ) Need Help??

raggmopp has asked for the wisdom of the Perl Monks concerning the following question:

Working with perl 5.8.8 on RHEL 5 system.

A script I have sends email upon completion. In the text of the email I have the address of a system to connect to.

sftp joe@host.domain.com

A single line of text with the addy that is passed through a MAIL subroutine.

my $txt = "Connect to "sftp joe\@host.mydomain.com"

Which is then fed to MAIL

print MAIL "$txt\n";

When the mail arrives it has the hyperlink and underline. I want to get rid of the hyperlink and underline, just send plain text in quotes.

Many Thanks

Replies are listed 'Best First'.
Re: remove @ link from perl generated email
by davido (Cardinal) on Apr 21, 2012 at 03:31 UTC

    You'll have to configure your mail client to stop trying to automatically detect hyperlinks. I believe this is an email client configuration issue. The email you're sending is probably plain old text, and you could verify that by viewing it raw. It's your mail client that is trying to be helpful. Nothing to do with Perl, nothing to do with the sender.


    Dave

Re: remove @ link from perl generated email
by Nocturnus (Beadle) on Apr 22, 2012 at 07:45 UTC

    I completely agree with davido.

    But additionally, I have the vague idea of turning the problem into something positive: Depending on the O/S and probably other circumstances, it might be possible to use some sort of URI so that the user even does not need to copy and paste the address. An (unrealistic) example just for explanation:

    Suppose it would not be sftp, but normal ftp. Then you could generate a string like

    "Connect to ftp://joe\@host.mydomain.com"

    Every reasonable mailer would then present ftp://joe@host.mydomain.com as link which could be clicked and would automagically open the appropriate application with the correct address when the user clicks the link.

    I haven't tried, but I could well imagine that when you have installed an sftp application, something like

    "Connect to sftp://joe\@host.mydomain.com"

    will work under most O/Ses with most mailers.

    Regards,

    Nocturnus

      Wikipedia has a nice overview of official and "unofficial but common" URI schemes in URI scheme. sftp and ssh are not yet official, but only (expired) RFC drafts.

      Alexander

      --
      Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://966294]
Approved by Happy-the-monk
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (5)
As of 2024-04-24 11:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found