Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^4: Using Net::SMTP to send email attachments

by astrobal (Acolyte)
on May 01, 2017 at 05:46 UTC ( [id://1189234]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Using Net::SMTP to send email attachments
in thread Using Net::SMTP to send email attachments

Hi there.

Believe me, I like an easy life. I would not be trying to hand-craft this email script if there was a neater, simpler way.

It has been written that there are 927 ways to send emails using Perl. MIME::Lite is a very nice example and I have used it (and still use it) very successfully. I use MIME::Lite to send the content of cgi forms to myself, at an email address which is local to the web server handling the form. The problem with 926 of these methods is that they were written 20 years ago, when spam was not the problem it is now and, email servers were happy to accept emails generated by non-local web servers. That is not the case today. What Net::SMTP does is to transfer the email to the local email server, from which it is then sent. That way the email is not then blocked by AOL and other email servers as not coming from an email server and so probably spam.

The other problem is that only MIME::Lite of the MIME variants is available on the suite of Perl modules available at my ISP. They like an easy life too, so they will not allow me to install modules of uncertain provenance - even if they do come from CPAN - that may be a potential threat to the security of their systems. I could a few years ago, but - like with emails - the world has moved on. So, I am stuck with what I have.

Thanks anyway for the suggestions...

  • Comment on Re^4: Using Net::SMTP to send email attachments

Replies are listed 'Best First'.
Re^5: Using Net::SMTP to send email attachments
by Anonymous Monk on May 01, 2017 at 07:09 UTC
    Hi there. Believe me, I like an easy life. I would not be trying to hand-craft this email script if there was a neater, simpler way.

    It has been written that there are 927 ways to send emails using Perl. MIME::Lite is a very nice example and I have used it (and still use it) very successfully. I use MIME::Lite to send the content of cgi forms to myself, at an email address which is local to the web server handling the form. The problem with 926 of these methods is that they were written 20 years ago, when spam was not the problem it is now and, email servers were happy to accept emails generated by non-local web servers. That is not the case today. What Net::SMTP does is to transfer the email to the local email server, from which it is then sent. That way the email is not then blocked by AOL and other email servers as not coming from an email server and so probably spam.

    In the time it has taken you to write that you could have tested the "Net::SMTP" back end of "mimesender" to verify that it does/can use Net::SMTP

    The other problem is that only MIME::Lite of the MIME variants is available on the suite of Perl modules available at my ISP. They like an easy life too, so they will not allow me to install modules of uncertain provenance - even if they do come from CPAN - that may be a potential threat to the security of their systems. I could a few years ago, but - like with emails - the world has moved on. So, I am stuck with what I have. Thanks anyway for the suggestions...

    In the time it has taken you to write that, you could have used "mimesender" to show you how your mime message is supposed to look exactly, no guessing

    Also, in the same time, you could have installed these pure-perl modules right next to your .cgis

    Yes, even you can use CPAN, A Guide to Installing Modules, Top 11 (GOOD) reasons not to use someone else's Modules, Top Seven (Bad) Reasons Not To Use Modules

      First problem is that MIME::Sender is not on the suite of Perl modules that my ISP provides.

      Second problem is that because I am a mean cheapskate, my website has shared hosting so I am not allowed to install any modules that I might want - or even need...

        Did you read any of the links that the Anonymous Monk gave you? They show plenty of ways to include CPAN modules, even when you think you cannot.

        I use shared hosting, but my ISP provides a CPanel interface to install modules from CPAN, so "shared hosting" is not a barrier -- even cheap shared hosting (mine's on the order of $5/month).

        Further, as those links would explain in better detail and with more alternatives, if you have the capability to write your cgi script onto your host, you have every privilege required to include a pure-perl CPAN module: if you upload script to /home/username/www/cgi-bin/myscript.cgi, then you could create the directory /home/username/www/cgi-bin/lib/, and place the .pm files appropriately in that directory, and just make sure that myscript.cgi includes use lib './lib/';. If you also have SSH or other shell access, you most likely also have access to a compiler, and can probably install even non-pure-perl modules in that subdirectory.

        Well,

        You don't need your ISP, to install perl on your home computer, to use mimesender to see how to talk MIME

        Also what pryrt said

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (7)
As of 2024-04-24 07:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found