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

Re^3: Need to send an email through my SMTP server using Perl

by socketdave (Curate)
on Aug 29, 2014 at 21:07 UTC ( #1099044=note: print w/replies, xml ) Need Help??


in reply to Re^2: Need to send an email through my SMTP server using Perl
in thread Need to send an email through my SMTP server using Perl

Even if you clean up personal information, you should still post code that will run. Also, be sure to post the entire error message. Did you delete the content you're assigning to 'Hello'? That would yield something like the error you mention in your reply. It should do a decent job of picking a helo line for you.
use strict; use warnings; use Net::SMTP; $host = "mail.host.com"; $port = 25; $smtp = Net::SMTP->new($host, port=>$port); $smtp->mail("test\@domain.com"); $smtp->recipient("test\@domain2.com"); $smtp->data; $smtp->datasend("From: test\@domain.com"); $smtp->datasend("To: test\@domain2.com"); $smtp->datasend("Subject: Test"); $smtp->datasend("\n"); $smtp->datasend ("This is a test"); $smtp->dataend; $smtp->quit;

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (7)
As of 2020-10-27 18:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (257 votes). Check out past polls.

    Notices?