Solved

I will pay cash for a script that......

Posted on 1998-10-18
8
286 Views
Last Modified: 2010-03-05
I am doing a fairly complex website for someone at the moment, and i am getting paid for it, so i thought i had better do a good job :)

I am willing to pay someone to come up with a script that i can use in any script of mine, and which i have total ownership of once it is paid for.

I want to be able to send emails from within perl scripts...but I do not have a sendmail program. I am running a Windows NT server, but my isp doesnt have a mail program installed on this, so a program will have to be included to actually send the mail once the data is ready to go...prefferably an OO ADT, but something like:

mail.reciever = "$email_address";
mail.subject = "$subject";
mail.sender = "$sender";
mail.message = "$Hello there $name, how the hell are you??";
mail.send;

OR even a function that accepts all the above as a parameter....

maildata{'reciver'} = $reciever;
maildata{'sender'} = $sender;
maildata{'subject'} = $subject;
maildata{'message'} = $message;

sendmail(%maildata);

i dont care how it works, but i would like it to work on NT and Unix.

is anyone up to it?

if not, where can i get one???
0
Comment
Question by:activegs
  • 5
  • 3
8 Comments
 
LVL 5

Accepted Solution

by:
b2pi earned 120 total points
ID: 1205481
Hmmm, I assume you have an SMTP Server?

perldoc Net::SMTP
<snip>
This example sends a small message to the postmaster at the
SMTP server known as mailhost
 
use Net::SMTP;
 
$smtp = Net::SMTP->new('mailhost');
 
$smtp->mail($ENV{USER});
$smtp->to('postmaster');
 
$smtp->data();
$smtp->datasend("To: postmaster\n");
$smtp->datasend("\n");
$smtp->datasend("A simple test message\n");
$smtp->dataend();
 
$smtp->quit;


<snip>

You can get a lot fancier than that, see the docs on Net::SMTP
0
 

Author Comment

by:activegs
ID: 1205482
Where can i get a copy of that library, and also, what if i am not the post master, can i subsitute my email address there??





0
 
LVL 5

Expert Comment

by:b2pi
ID: 1205483
www.perl.com is where you can get all perl modules

Yes, you can substitute _anyone's_ address there.
0
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 

Author Comment

by:activegs
ID: 1205484
I go to perl.com and search for this module, but i get this document, I cannot find a binary file anywhere.

http://reference.perl.com/wrap.cgi?net-smtp

0
 
LVL 5

Expert Comment

by:b2pi
ID: 1205485
That's funny.  When I go to www.perl.com and search for smtp, I see
immediately that Net::SMTP is part of the libnet bundle, which is at
www.perl.com/CPAN-local/modules/by-module/Net/libnet-1.0605.tar.gz.
However, it's also included already in the binary distributions.  You
may not need to actually donwload it (to find out, just type in perl
at a command line, and then type in

use Net::SMTP;

If you don't get error messages there, you don't need to download it.
0
 

Author Comment

by:activegs
ID: 1205486
i type in a perl script

use Net:SMTP;

i get...cannot find Net/SMTP.pm in @inc...

I cannot find this perl module anywhere can you email a copy of it at John@ActiveGS.com.au ??

ta, John
0
 

Author Comment

by:activegs
ID: 1205487
I am running nt remeber, and I could not download the file you typed above for some unkown reason....(IE says my security settings a wrong - i can't ftp it!!)
0
 

Author Comment

by:activegs
ID: 1205488
Actually could you email me all the pm in the library??
these are:
Net::FTP       RFC959            File Transfer Protocol
Net::SMTP      RFC821            Simple Mail Transfer Protocol
Net::Time      RFC867            Daytime ProtocolNet::Time      RFC868            Time Protocol
Net::NNTP      RFC977            Network News Transfer Protocol
Net::POP3      RFC1939            Post Office Protocol 3
Net::SNPP      RFC1861            Simple Network Pager Protocol

thanks,note the increase in points....
John
John@ActiveGS.com.au
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
delete query using perl dbi 3 108
Need to install DBD::MySQL on a MAC without a local MySQL server for Perl 4 69
Using Perl to parse rows 7 97
PERL - Find newest folder 12 150
I have been pestered over the years to produce and distribute regular data extracts, and often the request have explicitly requested the data be emailed as an Excel attachement; specifically Excel, as it appears: CSV files confuse (no Red or Green h…
In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question