Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
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 ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1099044]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (6)
As of 2024-04-24 12:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found