Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: (Zigster) e-mail question

by zigster (Hermit)
on May 01, 2001 at 18:23 UTC ( #76966=note: print w/replies, xml ) Need Help??


in reply to e-mail question

You have to take the place of pine sending your mail to a place that can handle it. The simplest way to do this is to locate the SMTP server on your network. Look in pines configuration it will point to a machine that exposes port 25. This machine will know how to route mail. It will expect connections from a variety of mail clients. You then use a perl module such as net::smtp as shown below.
use Net::SMTP; my $from='foo@spangle.com'; my $to='someuser@host.com'; my $smtp= Net::SMTP->new('SMTPHOSTNAME', Timeout => 180); $smtp->mail($from); $smtp->to($to); $smtp->data(); $smtp->datasend("YOUR MESSAGE"); $smtp->dataend(); $smtp->quit();
There is no reason to set mail up on the web server, as long as it can see a machine that can route the mail. If the webserver is in your DMZ and cannot see your internal SMTP server speak to your sysadmin and find out where the next hop is. Your local SMTP server will have to route all its mail out to another SMTP server to do the delivery. Unless you work for a v large company it is unlikely you do local mail routing. This second hop SMTP server will most likely be hosted within your ISP. --

Zigster

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://76966]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2017-12-17 07:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (462 votes). Check out past polls.

    Notices?