Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
11-03-2013, 01:28 PM #1
- Join Date
- Oct 2013
- Thanked 0 Times in 0 Posts
Problem with sending email using MIME Lite
I have written the following perl code to send email:
$MIME::Lite:EBUG = 1;
my $theSubject = "test";
my $theData = "<h1>This is test email sent by Perl Script</h1>";
my $theEmail = MIME::Lite->new(
$theEmail->send( "smtp", "smtp.ptcl.com", AuthUser=>'username' , AuthPass=>'password');
However its not working and i am getting following errors:
D:\Zulfi\PERL MAIN FOLDER>perl email1.pl
SMTP Failed to connect to mail server: Bad file descriptor
at email1.pl line 20.
D:\Zulfi\PERL MAIN FOLDER>
11-03-2013, 03:49 PM #2
- Join Date
- May 2005
- Southern tip of Silicon Valley
- Thanked 209 Times in 203 Posts
Here's the result of a port scan of that server.
That means that the smpt port 25 is blocked by firewall rules. It may be that they only allow users from specific outside IP addresses to send email through it, or that they only allow emails from hosts within their local network.D:\test>nmap -p 25 smtp.ptcl.com
Starting Nmap 5.21 ( http://nmap.org ) at 2013-11-03 07:29 Pacific Standard Time
Nmap scan report for smtp.ptcl.com (18.104.22.168)
Host is up (0.14s latency).
rDNS record for 22.214.171.124: 208-87-35-103.securehost.com
PORT STATE SERVICE
25/tcp filtered smtp
Nmap done: 1 IP address (1 host up) scanned in 13.09 seconds
If that is your ISP or your company's smtp server, then you'll need to contact their tech support to find if you are allowed to send emails through that server.
Also, using a yahoo address for the FROM (source) address will be problematic when sending emails out through any non yahoo server.