Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mime::Lite 1

Status
Not open for further replies.

audiopro

Programmer
Apr 1, 2004
3,165
GB
My ISP chose not to install this module on their servers as they say it contains a large amount of bugs.

I have used it on many occasions to email from servers and the only problems I encountered were down to me not forming the email correctly.

The question is:- Is MIME::Lite as problematic as they say and if so, what should I be using instead?

Keith
 
Well as I understood things Keith MIME::Lite was the defacto module for sending emails especially if you have email attachments.

I've even written a TLS Encryption wrapper for it.

I've had many web hosts over many years and I've never come across MIME::Lite not being installed. I even beleive it's a base module for Active State Perl, as I never needed to use the PPM to install it separately from the perl install?

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

MIME::Lite TLS Email Encryption - Perl v0.02 beta
 
I have been using this module for years too, without any trouble. The ISP is a major player in the industry but they do come out with some strange statements at times.
As well as problems with MIME::Lite, I have also had to fight tooth and nail with them to install Carp. I have a feeling that I am the only person using Perl on this set of servers and I am a bit of a nuisance at times.

Keith
 
is it *nix or windows hosting.

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

MIME::Lite TLS Email Encryption - Perl v0.02 beta
 
hmm, that does suprise me then. I guess they want you to move over to PHP.

Something I have resisted for a long time and will continue to do so!

Have you tried plonking it into your main CGI-BIN and using the ole
Code:
# Set path to user modules
use FindBin qw($Bin);
use lib "$Bin";

Not sure if it will run on its own as it does have dependencies, but it's not difficult to create the correct structure from your CGI-BIN folder and get it to work ;-)

I've done that before with another module that the web host wouldn't install :)

Modules like the Template.pm module can just be dumped into your CGI-BIN and ran that way without the need for the host to physically install it.



"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

MIME::Lite TLS Email Encryption - Perl v0.02 beta
 
They have installed Mime::Lite for me in my cgi-bin and I too have installed Template.pm in there with no problems. It was more a question of why it was not on the server as standard.

With regards PHP, I was asked to look at an e-commerce site, written in PHP this week, to see if I could add a variable postage rate to it.
I have access to all the files and they are scattered all over the place with no docs to speak of. If this is an example of PHP at work, then I too will be sticking with Perl. I suppose it is possible that it was written very badly but I don't really like the way that HTML and script are mixed together.

Keith
 
I'm with you on that. You guys taught me code separation and even when I write Javascript and CSS I always use an external separate file.

Code -> presentation separation is how I've learned and I prefer it that way.

However I think it is just a poor implementation as i'm sure you could separate PHP and HTML and use includes also to achieve similar separation.

But I also had a situation where my sisters boyfriend contacted me in a panic as their ecommerce site went down, it's written in PHP.

He asked me to look into it for them, when I ran the script it threw a tonne of warnings for bad coding such as non-declared variable use (like strict), but this didn't stop the script running.

I said we need to clean this up, I'm not a PHP head, so before I can work out why this script has stopped working, we need to clear up these bad practice errors and diabolical coding.

He wasn't interested and just went on about how it had worked for years, I left him to it.

so my experience with other peoples PHP isn't a good one either, very sloppy coding indeed. Though I did work on an open source project called the Google Rank Extractor and ported over someones PHP to a perl version, it was the best PHP I've seen yet, but still didn't separate PHP & HTML! - dunno maybe us perl heads are more anal? aferall there is some diabolical perl code out there, I shudder at the code I used to write a few years back!

Or maybe the difference is as this forum says ->
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS
;-)

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

MIME::Lite TLS Email Encryption - Perl v0.02 beta
 
I dare say some of the code I write now is a nightmare for someone else to work out.
Apart from the PHP confusion on this site, there was a javascript error on the index page so I ran it through a validator, 248 errors and masses of warnings, that was enough for me.

I do use PHP for some tasks, mainly graphic stuff ie. creating thumbnails on the fly or adding watermarks to gallery pictures. I looked into image magic for Perl at one time but could never get it to run.

Keith
 
yeah I have one PHP script in my entire perl web app and it's just for images manipulation (turn input text into an image using any TTF file).

I couldn't work it out with perl!

So I know where you're comming from.

At least you got MIME installed and working, I was initially concerned you were stuck without it.

This is the first I've ever heard of MIME:Lite being slated as too dodgy to be installed.

so do let us know if you find any more on this.


"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

MIME::Lite TLS Email Encryption - Perl v0.02 beta
 
Hi

1DMF said:
yeah I have one PHP script in my entire perl web app and it's just for images manipulation (turn input text into an image using any TTF file).

I couldn't work it out with perl!
Huh ? Is not so complicated.
Perl:
[gray]#!/usr/bin/perl -w[/gray]

[b]use[/b] strict[teal];[/teal]
[b]use[/b] warnings[teal];[/teal]

[b]use[/b] Image[teal]::[/teal]Magick[teal];[/teal]

[b]my[/b] [navy]$image[/navy][teal]=[/teal]Image[teal]::[/teal]Magick[teal]->[/teal][COLOR=darkgoldenrod]new[/color][teal]([/teal]size[teal]=>[/teal][green][i]'320x200'[/i][/green][teal]);[/teal]
[navy]$image[/navy][teal]->[/teal][COLOR=darkgoldenrod]Read[/color][teal]([/teal][green][i]'xc:white'[/i][/green][teal]);[/teal]

[navy]$image[/navy][teal]->[/teal][COLOR=darkgoldenrod]Annotate[/color][teal]([/teal]
  gravity[teal]=>[/teal][green][i]'Center'[/i][/green][teal],[/teal]
  font[teal]=>[/teal][green][i]'/usr/share/imlib2/data/fonts/cinema.ttf'[/i][/green][teal],[/teal]
  pointsize[teal]=>[/teal][purple]80[/purple][teal],[/teal]
  fill[teal]=>[/teal][green][i]'steelblue'[/i][/green][teal],[/teal]
  text[teal]=>[/teal][green][i]'1DMF'[/i][/green]
[teal]);[/teal]

[navy]$image[/navy][teal]->[/teal][COLOR=darkgoldenrod]Write[/color][teal]([/teal]filename[teal]=>[/teal][green][i]'1DMF.png'[/i][/green][teal]);[/teal]

[b]undef[/b] [navy]$image[/navy][teal];[/teal]
1dmf.png



Feherke.
 
cool Feherke,

I couldn't get it to work, though we are talking 6 years ago, i found a PHP script that did work and it's been in the web app ever since.

And if it aint broke ;-)



"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

MIME::Lite TLS Email Encryption - Perl v0.02 beta
 
My problem with Image Magic wasn't so much a problem working it out but s a problem with the ISP not installing it.
It is on the new server I recently moved my sites to and is on the long list of things to look at when I have nothing else to do.

I have a feeling that the techs at the ISP don't really understand Perl and like so many computer types, I have met over the years, go into BS mode rather than admit their lack of knowledge.

Keith
 
Further to this tread - I am still trying to get MIME::Lite working on this virtual server. My latest attempts required me to read some of the CPAN Docs and this is what I found.
MIME::Lite is not recommended by its current maintainer. There are a number of
alternatives, like Email::MIME or MIME::Entity and Email::Sender, which you
should probably use instead. MIME::Lite continues to accrue weird bug reports,
and it is not receiving a large amount of refactoring due to the availability
of better alternatives. Please consider using something else.

So why is it suddenly not recommended when it has worked for many years without problems.
Was it perhaps not broken so it had to be fixed?
What are we meant to use instead, the alternatives seem to have a long list of dependencies associated with them which makes installing them locally, a nightmare.

Keith
 
The mind boggles. I have used MIME::Lite for years and continue to do so without any problems what so ever.

I use it on Linux (FreeBSD) and Windows ActiveState perl, I send normal SMTP and even TLS encrypted with my MIME:Lite TLS hack wrapper module.

I have no idea what problem your host seems to be having but it is rather worying if CPAN now have that caveat for MIME::Lite.

Let me know how you get on with the other modules should you try them as i guess i need to consider getting rid of MIME:Lite if its own author doesn't recommend using it anymore!

What ever happend to "if it aint broke!"



"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

MIME::Lite TLS Email Encryption - Perl v0.02 beta
 
I have not been able to get the MIME::Lite module to work on this particular server. Another of my clients has a virtual server with the same ISP and MIME::Lite works on that one without problems.

MIME::Lite loads and goes through the motions but no emails are delivered. The ISP tell me that the log file reports the module itself, is not being loaded. If it wasn't being loaded, there would be an error reported.


Keith
 
I take it the good ole fashion NET::SMTP method works for emails with no attachment requirments?

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

MIME::Lite TLS Email Encryption - Perl v0.02 beta
 
The mystery deepens, I re-installed MIME::Lite this afternoon for the umpteenth time and it has suddenly started to work. I wonder if the techs at the ISP have had a moment of New Year's inspiration?

Keith
 
hmmm, something certainly sounds fishy!

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

MIME::Lite TLS Email Encryption - Perl v0.02 beta
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top