Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Hi

In the system in which SMTP is not working thru perl, I tried with PHP. It works precisely with PHP. Here is the PHP code:

<?php require("class.phpmailer.php"); $mail = new PHPMailer(); $mail->IsSMTP(); // set mailer to + use SMTP $mail->Host = "pop.myserver.com"; // specify main and backup server $mail->SMTPAuth = true; // turn on SMTP authentication $mail->Username = "srikanth"; // SMTP username $mail->Password = "mypass"; // SMTP password $mail->From = "from@somedomain.com"; $mail->AddAddress("to@somedomain.com"); // name is op +tional $mail->Subject = "Here is the subject"; $mail->Body = "This is the HTML message body"; $mail->AltBody = "This is the body in plain text for non-HTML mail cli +ents"; if(!$mail->Send()) { echo "Message could not be sent."; } else { echo "Message has been sent"; } ?>

And, here is the debug=>1 output by Perl:

Net::SMTP_auth>>> Net::SMTP_auth(0.08) Net::SMTP_auth>>> Net::SMTP(2.29) Net::SMTP_auth>>> Net::Cmd(2.26) Net::SMTP_auth>>> Exporter(5.58) Net::SMTP_auth>>> IO::Socket::INET(1.31) Net::SMTP_auth>>> IO::Socket(1.30) Net::SMTP_auth>>> IO::Handle(1.27) Net::SMTP_auth=GLOB(0x81faaa8)<<< 220 ESMTP Net::SMTP_auth=GLOB(0x81faaa8)>>> EHLO localhost.localdomain Net::SMTP_auth=GLOB(0x81faaa8)<<< 250-pop.myserver.com Net::SMTP_auth=GLOB(0x81faaa8)<<< 250-PIPELINING Net::SMTP_auth=GLOB(0x81faaa8)<<< 250-SIZE 20480000 Net::SMTP_auth=GLOB(0x81faaa8)<<< 250-VRFY Net::SMTP_auth=GLOB(0x81faaa8)<<< 250-ETRN Net::SMTP_auth=GLOB(0x81faaa8)<<< 250-AUTH PLAIN LOGIN Net::SMTP_auth=GLOB(0x81faaa8)<<< 250 8BITMIME Unknown callback: 'authname'. (user|auth|language|pas

Also I have tried PLAIN & CRAM-MD5 apart from LOGIN

Any suggestion?

Thanks
Srikanth


In reply to Re^4: Net::SMTP - Authentication Problem by vi_srikanth
in thread Net::SMTP - Authentication Problem by vi_srikanth

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-04-19 04:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found