Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: (Zigster) e-mail question

by zigster (Hermit)
on May 01, 2001 at 18:23 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://76966]
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: (6)
As of 2024-04-23 09:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found