Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: MAIL::Sendmail Problem

by Paulster2 (Priest)
on Nov 07, 2003 at 20:43 UTC ( [id://305434]=note: print w/replies, xml ) Need Help??


in reply to MAIL::Sendmail Problem - Updated

I don't know for sure, but maybe the code is interpreting it as a typical way you bring seperate variables together (The technical term is slipping me).

Question back at you, why don't you put the URL in a variable, that way it would be easy to change and find. Also you would be able to see what it looks like by printing it somewhere or something. I try to do this in seperate test code to make sure that I know what I am getting. I do realize that the URL is going to be static, but you may want to reuse the code for somethign else sometime, and finding the variables upfront and in technicolor may be of use. But then again, what do I know, I'm just a novice.

Something else I have used successfully is when the need for double quotes are used for printing, try using a single quote on the outside. This works pretty good in most instances and there is less need to backslash everything. This makes the code cleaner to look at. I guess what I am trying to say is to try and format it some other way that should work and see if it does. Goes back to the There's more than one way... thing.

Someone else may have a better input, but this is what I have for you for now. Hope it helps.

Paul

Replies are listed 'Best First'.
Re: Re: MAIL::Sendmail Problem
by bilfurd (Hermit) on Nov 07, 2003 at 21:08 UTC
    Thanks for your input, Paulster2

    As far as putting the URL in a variable, the message text changes a lot from project to project, and we use several different URLs. Usually, I get the message text from Big Boss or another project leader via e-mail. A little cut-and-paste with the message text, tweak the database calls, and fire.

    Hmmm... I did this code a few years ago using examples and did not use strict. I am going to fix that now, then perform a suitable act of contrition so I never forget to use strict again.

      Sounds like a good place to use a heredoc.
        It's a great place to use heredoc.

        (probably why I never thought of it...)

      You could also put the entire message in a flat file or something, then read it into a generic sending script. This would make it real easy to change everything. Again it's a cut and paste operation, but your PERL code wouldn't have to change every time that the boss says send.

      Paulster2

      Not a sermon, just a thought!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://305434]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (6)
As of 2024-03-28 14:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found