title: How can I debug my Net::SMTP Perl program?
body: <p>I'm building a application that sends a test message to another email, the program executes without errors, but when I check my email there isn't any new email, take a look at my code:</p>
  
  <pre><code>my $smtpserver = 'smtp.vix.terra.com.br';
  my $smtpuser = 'nathanpc';
  my $fromemail = 'nathanpc@terra.com.br';
  
      my $smtp = Net::SMTP-&gt; new($smtpserver, Timeout =&gt; 120);
      $smtp-&gt; mail($smtpuser);
      $smtp-&gt; to('eeepc904@gmail.com');
      $smtp-&gt; data();
      $smtp-&gt; datasend("To: eeepc904\@gmail.com\n");
      $smtp-&gt; datasend("From: nathanpc\@terra.com.br\n");
      $smtp-&gt; datasend("\n");
      $smtp-&gt; datasend("test\n");
      $smtp-&gt; dataend();
      $smtp-&gt; quit;
  </code></pre>