I send email from Windows boxes all the time ... but using a unix box somewhere ;-)

Specifically, the Net::SMTP protocol is not very difficult, IMO, if you can figure out the SMTP server to use. My guess, which you may need to ask NetworkSolutions to confirm, is to use mail.networksolutions.com:

$ dig networksolutions.com mx ; <<>> DiG 9.2.4 <<>> networksolutions.com mx ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 15900 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 3, ADDITIONAL: 4 ;; QUESTION SECTION: ;networksolutions.com. IN MX ;; ANSWER SECTION: networksolutions.com. 10800 IN MX 10 mail.networksolutio +ns.com. [snip]
I know that's not definitive, but it's really darned likely. Again, confirm with the service provider, but it likely works.

Something like...

use Net::SMTP; my $smtp = Net::SMTP->new(q('mail.networksolutions.com')) or die "Can't connect to SMTP server"; my $ownuser = 'me@myisp.com'; $smtp->mail($ownuser); $smtp->to('joe@somewhereelse.net'); $smtp->data(); $smtp->datasend('Subject: Email from the server.',"\n"); $smtp->datasend('Date: ', scalar(time), "\n"); $smtp->datasend('To: ', join(', ', @emailaddrs), "\n"); $smtp->datasend('From: Packaging ' . $plat->platformID() . "<$ownaddr> +\n"); $smtp->datasend('X-Mailer: Perl Net::SMTP', "\n"); $smtp->datasend("\n"); $smtp->datasend(@message_text); $smtp->dataend(); $smtp->quit();
Of course, there's some extra error-handling involved here, and you can add the error handling that is appropriate to your scenario (e.g., put up the right error page, or something).

Note that instead of connecting to a single server, I actually do something more like:

sub smtp_connect { for my $s (@server_list) { my $smtp = Net::SMTP->new($s); return $smtp if $smtp; } undef; }
This allows me to pick a set of servers to try, and I can try them (in order). Some of my work SMTP servers are more stable than others... and the stable ones are the ones I'm not supposed to use (but I'll be darned if that gets in the way of getting my job done ;->).


In reply to Re: Sending Mail on a Windows Machine by Tanktalus
in thread Sending Mail on a Windows Machine by jpk236

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.