Net::SMTP via PERL is not working in few cases


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Net::SMTP via PERL is not working in few cases
# 1  
Old 11-13-2009
Net::SMTP via PERL is not working in few cases

We are getting some special scenarios where Net::SMTP is not working for some mails.

we are sending a similar kind of data via mails but some of the mails are not received.

After checking the Net::SMTP in debug mode we found below difference:

Good One - (Mail sent properlly)
---
-----
Net::SMTP=GLOB(0x1bfcd34)>>>
Net::SMTP=GLOB(0x1bfcd34)>>> </body></html>
Net::SMTP=GLOB(0x1bfcd34)>>> .
Net::SMTP=GLOB(0x1bfcd34)<<< 250 2.0.0 nAD6WZah001063 Message accepted for delivery
Net::SMTP=GLOB(0x1bfcd34)>>> QUIT
Net::SMTP=GLOB(0x1bfcd34)<<< 221 2.0.0 XXX.yyy.com closing connection



Failed One - (Mail not recieved )
-----
----------
Net::SMTP=GLOB(0x1bfccb4)>>>
Net::SMTP=GLOB(0x1bfccb4)>>> </body></html>
Net::SMTP=GLOB(0x1bfccb4)>>> .
Net::SMTP=GLOB(0x1bfccb4)<<< 250 OK: data received
Net::SMTP=GLOB(0x1bfccb4)>>> QUIT
Net::SMTP=GLOB(0x1bfccb4)<<< 221 2.0.0 XXX.YYY.com closing connection


Can some one please help me undestanding this issue
Thanks in advance
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Perl Net::IP not working

Experts - I have a snippet of code I can't figure out. I was hoping someone could help me here. I have a file of IPv6 address that I need to format correct. Example in: 2620:0:2d0:200::7 2620:0:2d0:200:a0:c 2620:0a:3f0:200:a0:c I need to convert them to:... (3 Replies)
Discussion started by: timj123
3 Replies

2. Shell Programming and Scripting

Perl: Send mail via SMTP

I have a existing perl program , in this program it will output a email address list to a variable ( $email_list ) , mail content to a variable ( $email_content ) , if I want to send all email to these email address with corresponding content , would aadivse how to write a perl script ? thanks (2 Replies)
Discussion started by: ust3
2 Replies

3. Web Development

Ssh authentication from .NET webpage to UNIX is not working

My .NET website invokes a perl script to perform GIT operations on Gerrit server running UBuntu. In the perl script I connect using passwordless authentication to Gerrit server as below: system ( "ssh gitadmin@gerritserver.com 'cd /xyz && git clone xxx' "); I verified that ssh authentication... (3 Replies)
Discussion started by: tkota
3 Replies

4. Shell Programming and Scripting

MIME Type detection for Net::SMTP

I've spent a good two weeks on trying to figure out a proper way to get the mime type of a file. The "file" command on the Sparc machine I'm working on is an older version and does not support the --mime flag. It outputs things like: somefile.pdf: Adobe Portable Document Format (PDF) v1.5 ... (3 Replies)
Discussion started by: mrwatkin
3 Replies

5. Shell Programming and Scripting

Net::OpenSSH not working on Unix machine.

So, I installed the Net::OpenSSH module and I am having trouble getting it to work. It appears to be failing on this code: my $ssh = Net::OpenSSH->new('user:passwd@host.com'); $ssh->error and die "Couldn't establish SSH connection: ". $ssh->error; It's pretty simple code. I keep... (0 Replies)
Discussion started by: mrwatkin
0 Replies

6. Shell Programming and Scripting

Perl - Net::FTP issue

Wondering if anyone can help or advise on following issue. The below script should simply connect to a different server and retrieve certain files for me. use lib "/xxxxx/xxxxx/xxxxx/xxxx"; use Net::FTP; my $directory = "xxxxxxxx"; my $destinationDir = "xxxxxxxxx"; my $filePrefix =... (1 Reply)
Discussion started by: meevagh
1 Replies

7. Shell Programming and Scripting

Net::Ftp in perl

I am trying to execute a script in another server, i used Net::Ftp module How to execute unix command in another server by using Net::Ftp module.. #!/usr/bin.perl ### Perl script to $ftp->login($user_name,'password') or die "Cannot login ", $ftp->message;... (2 Replies)
Discussion started by: pritish.sas
2 Replies

8. Shell Programming and Scripting

Sending Attachment using MIME::Lite and Net::SMTP

Hello, I'm a newbie perl scriptor and i'm trying to figure out why i can't send an email using MIME::Lite with Net::SMTP. I keep receiving the following error: SMTP MAIL command failed: 5.7.1 Helo invalid . at attach1.pl line 31 The error keeps coming from the very last line... (2 Replies)
Discussion started by: xmaverick
2 Replies

9. Shell Programming and Scripting

Best place on the net to get Perl tutorials ?

I am looking for a full Perl course on internet (tutorial) to learn everything about Perl. I already know a bunch of programing languages. I have started Unix interests this year ever since I installed Ubuntu Linux on my PC AND I also got a job at IBM doing software distributions with... (1 Reply)
Discussion started by: Browser_ice
1 Replies

10. Shell Programming and Scripting

Net::smtp - Did this work

Hi, I have read the related posts by perleo and those who assisted. I wish to do a similar thing, in that I wish to use the Net:smtp module. I have downloaded it and followed the instructions for the install. When I check the perldoc net::smtp, the information returns (thus showing it... (1 Reply)
Discussion started by: cheng
1 Replies
Login or Register to Ask a Question
Net::SMTP::TLS(3pm)					User Contributed Perl Documentation				       Net::SMTP::TLS(3pm)

NAME
Net::SMTP::TLS - An SMTP client supporting TLS and AUTH VERSION
Version 0.12 SYNOPSIS
use Net::SMTP::TLS; my $mailer = new Net::SMTP::TLS( 'your.mail.host', Hello => 'some.host.name', Port => 25, #redundant User => 'emailguy', Password=> 's3cr3t'); $mailer->mail('emailguy@your.mail.host'); $mailer->to('someonecool@somewhere.else'); $mailer->data; $mailer->datasend("Sent thru TLS!"); $mailer->dataend; $mailer->quit; DESCRIPTION
Net::SMTP::TLS is a TLS and AUTH capable SMTP client which offers an interface that users will find familiar from Net::SMTP. Net::SMTP::TLS implements a subset of the methods provided by that module, but certainly not (yet) a complete mirror image of that API. The methods supported by Net::SMTP::TLS are used in the above example. Though self explanatory for the most part, please see the perldoc for Net::SMTP if you are unclear. The differences in the methods provided are as follows: The mail method does not take the options list taken by Net::SMTP The to method also does not take options, and is the only method available to set the recipient (unlike the many synonyms provided by Net::SMTP). The constructor takes a limited number of Net::SMTP's parameters. The constructor for Net::SMTP::TLS takes the following (in addition to the hostname of the mail server, which must be the first parameter and is not explicitly named): NoTLS - In the unlikely event that you need to use this class to perform non-TLS SMTP (you ought to be using Net::SMTP itself for that...), this will turn off TLS when supplied with a true value. This will most often cause an error related to authentication when used on a server that requires TLS Hello - hostname used in the EHLO command Port - port to connect to the SMTP service (defaults to 25) Timeout - Timeout for inital socket connection (defaults to 5, passed directly to IO::Socket::INET) User - username for SMTP AUTH Password - password for SMTP AUTH TLS and AUTHentication During construction of an Net::SMTP::TLS instance, the full login process will occur. This involves first sending EHLO to the server, then initiating a TLS session through STARTTLS. Once this is complete, the module will attempt to login using the credentials supplied by the constructor, if such credentials have been supplied. The AUTH method will depend on the features returned by the server after the EHLO command. Based on that, CRAM-MD5 will be used if available, followed by LOGIN, followed by PLAIN. Please note that LOGIN is the only method of authentication that has been tested. CRAM-MD5 and PLAIN login functionality was taken directly from the script mentioned in the acknowledgements section, however, I have not tested them personally. ERROR HANDLING
This module will croak in the event of an SMTP error. Should you wish to handle this gracefully in your application, you may wrap your mail transmission in an eval {} block and check $@ afterward. ACKNOWLEDGEMENTS
This code was blatantly plagiarized from Michal Ludvig's smtp-client.pl script. See <http://www.logix.cz/michal/devel/smtp> for his excellent work. AUTHOR
Alexander Christian Westholm, awestholm at verizon dawt net Improvements courtesy of Tomek Zielinski perl v5.10.0 2006-01-17 Net::SMTP::TLS(3pm)