473,796 Members | 2,460 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Email server timing out in email script

I have a perl script running on machine A, a web server. A visitor
completes certain pieces of data and these are compiled into two emails, one
addressed to the visitor and copied to the site owner, the other addressed
to the webmaster and including cookie and timing data for debugging.

The email is sent by machine B which is the email server for the domain.
Here are some config values for the perl script, names have been changed to
protect the innocent.

my $smtp_server = "pennyblack ";
my $smtp_domain = "fred.fred.fred .fred";
my $MailFrom = "domain\@fred.f red.fred";
my $MailTo = "owner\@fred.fr ed.fred";

The opening part of the perl script is as follows:

sub psendmail()
{

use Net::SMTP;

# connect to an SMTP server
$smtp = Net::SMTP->new( $smtp_server, Hello => $smtp_domain, Timeout =>
10, Debug => 1);
if ( !$smtp ) { return 1; }
die "Couldn't connect psendmail to email server" unless $smtp;

$smtp->mail( $MailFrom); # use the sender's real address here
$smtp->to( $MailTo); # recipient's real address
$smtp->data(); # Start the mail

# Send the header.
$smtp->datasend("To : $MailTo\n"); # address in the email view
$smtp->datasend("From : $MailFrom\n"); #address in the email view

And here is the end of the process.

$smtp->dataend(); # Finish sending the mail
$smtp->quit; # Close the SMTP connection

return 0;
The email server is being opened in debug while I fix some issues, and the
short timeout is because of the following messages in the log, which had
been around 2 minutes each prior to my changing them.

Net::SMTP>>>
Net::SMTP(2.26)
Net::SMTP>>> Net::Cmd(2.24)
Net::SMTP>>> Exporter(5.57)
Net::SMTP>>> IO::Socket::INE T(1.27)
Net::SMTP>>> IO::Socket(1.28 )
Net::SMTP>>> IO::Handle(1.23 )
Net::SMTP=GLOB( 0x1ab6c08)<<< 220 fred.fred.fred. fred ESMTP MailEnable
Service, Version: 0-1.17- ready at 02/04/05 18:14:25
Net::SMTP=GLOB( 0x1ab6c08)>>> EHLO fred.fred.fred. fred
Net::SMTP=GLOB( 0x1ab6c08)<<< 250-fred.fred.fred. fred [10.0.0.27], this
server offers 4 extensions
Net::SMTP=GLOB( 0x1ab6c08)<<< 250-AUTH LOGIN
Net::SMTP=GLOB( 0x1ab6c08)<<< 250-SIZE 5120000
Net::SMTP=GLOB( 0x1ab6c08)<<< 250-HELP
Net::SMTP=GLOB( 0x1ab6c08)<<< 250 AUTH=LOGIN
Net::SMTP=GLOB( 0x1ab6c08)>>> MAIL FROM:
Net::SMTP=GLOB( 0x1ab6c08)<<< 250 Requested mail action okay, completed
Net::SMTP=GLOB( 0x1ab6c08)>>> RCPT TO: [Fri Feb 4 18:14:36 2005]
applymail.cgi:
Net::SMTP=GLOB( 0x1ab6c08): Timeout at C:/ .. obfuscated path ..
/cgi-bin/applymail.cgi line 210
Net::SMTP=GLOB( 0x1ab6c08)>>> DATA [Fri Feb 4 18:14:46 2005] applymail.cgi:
Net::SMTP=GLOB( 0x1ab6c08): Timeout at C:/ .. obfuscated path ..
/cgi-bin/applymail.cgi line 211
Net::SMTP=GLOB( 0x1ab6c08)>>> To: ow***@fred.fred .fred
Net::SMTP=GLOB( 0x1ab6c08)>>> From: do****@fred.fre d.fred

The email is being delivered, and where I have used a CC: definition on the
email to an external email service, this too has worked. This suggests the
email server is doing its job, yet the closure of the message also suggests
there is an issue. I need, at the very least, to get the time down for this
process, four timeouts on each of two mail sends means the script is taking
more than 80 seconds to run, and most of that is timeout.

Following is the closure part of the log. My apparently valid statements
above are also causing issues. There are no errors in any [part of the data
send.

Net::SMTP=GLOB( 0x1ab6c08)>>> . [Fri Feb 4 18:14:56 2005] applymail.cgi:
Net::SMTP=GLOB( 0x1ab6c08): Timeout at C:/ .. obfuscated path ..
/cgi-bin/applymail.cgi line 262
Net::SMTP=GLOB( 0x1ab6c08)>>> QUIT [Fri Feb 4 18:15:06 2005] applymail.cgi:
Net::SMTP=GLOB( 0x1ab6c08): Timeout at C:/ .. obfuscated path ..
/cgi-bin/applymail.cgi line 263
Kind regards

John

Jul 19 '05 #1
0 4526

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
2180
by: Shabam | last post by:
Ok I'm trying to run a php script written by someone else, not me, and it's getting stuck in a particular step. Actually it isn't getting stuck per se, but the browser is, because it's taking forever to return the results back to the browser. Here's the line that's responsible for this: $users = $db->query_return_array("SELECT * FROM user"); It's getting stuck because in my database I have over 60,000 records. Now,
6
4170
by: Jeffrey Silverman | last post by:
Hi, all. Sorry, first off, for the kidna weird selection of crossposted groups, but this question touches on aspects of discussion in each of the groups. So I have a group of around 500 email addresses to which I would like to send a mass email occasionally. The group will never be much larger than 500 email addresses and will occasionally be about half that size. I have written a simple HTML interface and PHP backend to process the...
4
2094
by: Bill | last post by:
Is it possible to somehow activate a page containing a php script by sending an email to a mailbox on the server? I have a script that sends out notification emails to an individual. He wants to receive them continuously until he decides he has seen enough of them. Then to stop receiving the emails he has to use his browser and go to the web page that is sending him the emails where he clicks a button. Would it be possible to arrange...
6
5402
by: bojanraic | last post by:
Hi! I recently started playing with Python CGI, and I was happy that my basic input-name--print-hello-name CGI form example worked, so I thought I should advance to somew\hat more complicated scripts. I'm trying to write a basic Python email CGI script to send email through HTML email form. I've seen a lot of examples out there, but nothing I tried so far seemed to work. So I would like to know what I am doing wrong.
2
5224
by: Mindful_Spirit | last post by:
I'm trying to set up a basic email feed back form like this, and was wondering about some basic configuration settings. I have used code from this website. I have it working just fine. I'm running IIS on my home machine. My problem is that I need to upload this stuff to a webhosting place and register a domain and I'm not sure what to put as the smtp mail server value
5
4592
by: Bryan Field-Elliot | last post by:
We're designing a web app in which some operations will take a long time to complete (maybe two minutes). Because it's a high-volume application, we don't want browser connections hanging open for these two-minute intervals; that would cause a huge resource drain on the server (open threads, etc.). We've implemented a page which has a <meta refresh> tag in it of 15 seconds, so that the browser can "check back" with the server every so...
3
8134
by: Russell | last post by:
I have a quirky issue that I believe involves timing and only 2 hairs left to pull. I have a modal dialog that is an IFrame. The IFrame contains another window - which contains the appropriate title. I am trying to change the title of the IFrame window to be that of the contained window title. If I uncomment the alert statement below - the title change works. Comment out the alert - and - no title change.
2
3197
by: SQL Server Questions | last post by:
Environment: Server1 (Local) OS Windows 2000 Server SQL Server 2000 Server2 (Remote) OS Windows 2003 Server SQL Server 2000 (Both with most recent service packs)
5
2723
by: ozzii | last post by:
Hi, I have a asp email script which uses cdosys to send emails with attahcments by iterating through a record set of 500 email addresses. However the script simply times out. I know you can increase the script timeout property in IIS but is there any other way of sending bulk emails with cdosys without it timing out? Any help would be greatly appreciated.
0
9683
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10457
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10231
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10176
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9054
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7550
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5443
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5576
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4119
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.