I never heard of CDONTS but here is a function that you can use to sendmail on just about any system
use Mail::Sender; #this calls the function &send_email( from => $from, to => $to, subject => $subject, message => $message, ); #this is the function sub send_email{ my %data = @_; #Hash #Check required fields foreach(qw( to from subject message )){ if(!exists $data{$_}){ return(1, "Missing $_"); } } #Defaults $data{contenttype} = ($data{contenttype}) ? $data{contenttype} : ' +text/plain'; #Build CC string my ($CCs); if(ref($data{cc})){ $CCs = join(',', @{$data{cc}}); }elsif(length($data{cc}) > 0){ $CCs = $data{cc}; } #Build BCC string my ($BCCs); if(ref($data{bcc})){ $BCCs = join(',', @{$data{bcc}}); }elsif(length($data{bcc}) > 0){ $BCCs = $data{bcc}; } # Send the email my $mail_errors; my %mailInfo; $mailInfo{from} = $data{from}; $mailInfo{to} = $data{to}; $mailInfo{subject} = $data{subject}; $mailInfo{b_ctype} = $data{contenttype}; $mailInfo{ctype} = $data{contenttype}; $mailInfo{cc} = $CCs if($CCs); $mailInfo{bcc} = $BCCs if($BCCs); foreach my $smtp ('SMTP SERVER 1', 'SMTP SERVER N') { # Set up email information $mailInfo{'smtp'} = $smtp; $mailInfo{'msg'} = $data{message}; # Send the email if (ref((new Mail::Sender)->MailMsg(\%mailInfo))) { return (0, ''); # Success } # Problem with sending the email $mail_errors .= "SMTP address: $smtp\nError: " . $Mail::Sender::Error . "\n"; } if($mail_errors){ chop $mail_errors; return (1, $mail_errors); } }
hope this helps

In reply to Re: USING CDONT by bear0053
in thread USING CDONT by kasikiva

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.