On 02/23/2017 11:50 PM, Luca Ferrari wrote:
On Fri, Feb 24, 2017 at 7:51 AM, ToddAndMargo <toddandma...@zoho.com> wrote:
Hi All,

Am I blind or is there nowhere to set the subject of an eMail
in Net::SMTP?

I suspect it is implementing a quite low-level interface: smtp does
not know anything about a subject, it simply sends it as a line
"Subject: foo bar"
followed by an empty line a your message body. In other words: the
subject is in the payload before your message content.

Luca



Hi Luca,

Thank you!

-T

This is what I will try if I can ever get
Net::SMTP to install:

<code>
sub eMailReport ( $message ) {
   # Reference: https://github.com/retupmoca/P6-Net-SMTP

   my $Subject = "Subject: $IAm ERROR(s) = $ErrorCount\n\n";

   if $ErrorCount eq 0 { AddToReport ( "Completed without errors\n" ); }
   else { AddToReport ( "Completed with $ErrorCount errors\n" ); }

   my $StringFullOfLineFeeds;
   for @Report -> $Line { $StringFullOfLineFeeds .= ( "$Line" ~ "\n" ); }

my $client = Net::SMTP.new(:server("smtpout.secureserver.net"), :port(3535), :debug);
   $client.auth( "p...@storall.biz", "admin");
   $client.send("p...@storall.biz", "p...@storall.biz,tmew...@zoho.com",
                "$Subject$StringFullOfLineFeeds);
   $client.quit;
}
</code>


--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Computers are like air conditioners.
They malfunction when you open windows
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Reply via email to