Author Topic: Exiting Browser stops mail send  (Read 12488 times)

technicalsupport

  • Posts: 5
    • View Profile
Exiting Browser stops mail send
« on: August 03, 2004, 03:22:51 pm »
We have observed that listmailpro stops sending messages once we close  or change the the browser window.

This occurs after we press the resume button on a stalled mailing.  We have tailed the maillog and can observe message send resuming after we hit the resume link.  However, once we change the page of the browser by hitting the back button or closing the browser, we are seeing that the mailing halts with the maillog.  We also see that lm_sendq is not decrementing by issuing the querie: select count(*) from lm_sendq and then repeating the querie 10 seconds later.

Once domail.php is called, shouldn't it run independently of the browser?

We have tried calling dailymail from the command line directly by copying the crontab command but have onserved that it does not resume a mailing task once it is started.  It does however start a brand new scheduled mail.

What command can we use from the command line to resume mailing and make it independent of the browser window?

technicalsupport

  • Posts: 5
    • View Profile
Exiting Browser stops mail send
« Reply #1 on: August 04, 2004, 01:48:46 pm »
After further investigation, we have discovered that listmailpro works fine on Plesk 6 but not on Plesk 7.

Since the program is quitting when the browser page exits, we think it might be an Apache issue.
The version of Apache on Plesk 6 is Apache/2.0.40
The version of Apache on Plesk 7 is Apache/2.0.46

Does anybody know of any patches or tweaks that can resolve this issue?

Thank you in advance.

technicalsupport

  • Posts: 5
    • View Profile
Problem solved
« Reply #2 on: August 04, 2004, 06:49:50 pm »
We discovered a php function called: ignore_user_abort(true)

We inserted this into the header of domail.php and have observed that lm_sendq continues to decrement after the browser window is closed or the page is changed.

Whew! :D

BGSWebDesign

  • Posts: 625
    • View Profile
    • http://www.bgswebdesign.com
How
« Reply #3 on: August 04, 2004, 07:44:44 pm »
Hi,

I'm not sure what you mean, please give exact code on how and where you inserted that line in domail.php so I can do it too.

Thank you,
Thanks,
-Brett
http://www.bgswebdesign.com/Contact-Us.php

*** I do custom List Mail Pro installations ***
Contact me through my website (above)

technicalsupport

  • Posts: 5
    • View Profile
Exiting Browser stops mail send
« Reply #4 on: August 04, 2004, 09:03:21 pm »
Here is a snippet of the code from the top of domail.php:


<?php
/* ListMail (c) 2002-2003 Dean Wiebe <dean@listmailpro.com>
   You may not modify or distribute the program without express permission from the author.
   Files are overwritten when updates are released, so it's not a good idea anyway. */

include("./config.php");
include("./admin.php");

$sqldebug = '';
ignore_user_abort(true);
ini_set("max_execution_time","0");

// phpinfo();


*Dean, I hope your not mad about the alteration but I had to do something or it was broke!   tlc

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
Exiting Browser stops mail send
« Reply #5 on: August 05, 2004, 04:23:47 am »
I'm glad you were able to figure something out.  I don't mind if you make changes as long as you don't distribute the program.  You may have helped all users of ListMail!  This function could allow me to easily implement "background sending".  I had previously figured it would take a shell_exec() command which may not be as readily supported.
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting

technicalsupport

  • Posts: 5
    • View Profile
Please read this if you implement this function!
« Reply #6 on: August 05, 2004, 09:36:10 am »
You do not want to call this function until you reach the point within the script where you don't want it to stop when the browser changes.

For example, when you hit send it on the domail page.  You would want this function to execute after that. Therefore the proper place within the code to insert this function would be:

#in domail.php:
if ($subbut == 'Send It!' || $resume){
 ignore_user_abort(true);

#In Dailymail.php:
 } else {
  optimizeall();
  $sendq = 0; // now a counter..
 
  ignore_user_abort(true);

  // DAILYMAIL SCRIPT

gwill23

  • Posts: 50
    • View Profile
    • http://www.residualenterprises.com
Thanks
« Reply #7 on: August 12, 2004, 10:31:52 am »
I was having this  issue.  Now it is fixed.  Are there any there any side effects I should be aware of?

Also, you should implement this in the next upgrade.

gwill23

  • Posts: 50
    • View Profile
    • http://www.residualenterprises.com
I implemented the changes dailymail still stops
« Reply #8 on: August 16, 2004, 11:20:49 am »
Dailymail still stops every night.  I have to go in and resume.  When I click resume it works very well.  I can't seem to find a solution in all the forum.  At least one I can understand.

I am using the prefered hosting company too.

BGSWebDesign

  • Posts: 625
    • View Profile
    • http://www.bgswebdesign.com
It doesn't work for me...
« Reply #9 on: August 16, 2004, 12:41:18 pm »
Hi,

I've tried placing the code you mentioned into my domail.php,
but it doesn't work for me:
Code: [Select]
ignore_user_abort(true);

I tried it on a list of 10,000 names, after the first 200, I exited
the browser.  I noticed that the list continued mailing up until
around 2,000 were sent out, after that domail.php quit.   When I
came back into List Mail I had the message that there were
still queued emails to be sent, and I noticed from my click tracking
that about 2,000 had gone out.

I resumed as usual to get them all out, does anyone have a
better fix on this?

Dean, do you have a way I can 'kick-start' the domail.php
to RESTART only - from the command line (perhaps via a
CRON job)?

Please post any suggestions, as this is really a problem with
large lists, and I have several.
Thanks,
-Brett
http://www.bgswebdesign.com/Contact-Us.php

*** I do custom List Mail Pro installations ***
Contact me through my website (above)

gwill23

  • Posts: 50
    • View Profile
    • http://www.residualenterprises.com
Exiting Browser stops mail send
« Reply #10 on: August 16, 2004, 01:40:42 pm »
When I changed my domail.php script as follows

#in domail.php:
if ($subbut == 'Send It!' || $resume){
ignore_user_abort(true);

I put it right under that if statement it works great.  I send out to 10,000+ each day right now.  When I finish importing my entire database it will be 160000+ spread out all over.  So far I have only had dailymail stop.  When I hit resume and wait 30 sec.  Close the browser and log back in I can watch the process finish.

It seems to work fine. except for dailymail stopping every night.

BGSWebDesign

  • Posts: 625
    • View Profile
    • http://www.bgswebdesign.com
more info please?
« Reply #11 on: August 16, 2004, 03:32:31 pm »
Hi Gunther,

Regarding this:
Quote
I put it right under that if statement it works great. I send out to 10,000+ each day right now. So far I have only had dailymail stop.


Wow, really... that's amazing, it stops on me all the time,
who do you host with, and what is the monthly cost?

Quote
When I hit resume and wait 30 sec. Close the browser and log back in I can watch the process finish.


Not sure what you mean here, watch the process finish, in
what way, watching the counter count up???   I can do that
too, but it's awful slow with 10,000, plus I'm using throttle
code to slow things down, if I don't then people that try
to unsubscribe are not able to, and it hoses up other things.

Quote
It seems to work fine. except for dailymail stopping every night.


Every night, how do you know it stops?  Is there anything being done about that, does Dean know about it?   Hmmm....

I guess I need something to just 'kick start', or 're-start' domail.php from the command line on a regular basis, like every hour or so, that way, it just starts up domail.php over and over again and I can close the browser and not have to worry about it; anybody got any ideas?

The other problem is that my domail.php tends to stop on me, even if I leave the browser open if I am doing other internet activity, it just shuts down and gives me an error to 'see Config', and that's it, I have to re-start, I believe it's a hosting issue and am curious which host I could use to prevent these problems?

Any ideas?
Thanks,
-Brett
http://www.bgswebdesign.com/Contact-Us.php

*** I do custom List Mail Pro installations ***
Contact me through my website (above)

gwill23

  • Posts: 50
    • View Profile
    • http://www.residualenterprises.com
Re: more info please?
« Reply #12 on: August 16, 2004, 10:26:19 pm »
Quote
Wow, really... that's amazing, it stops on me all the time,
who do you host with, and what is the monthly cost?


I use the host4profit host and payed listmail support to set it all up for me.
http://www.Host4Profit.com/cgi-bin/home.cgi?55755
Cost $24.95 / mo I think.

Quote
When I hit resume and wait 30 sec. Close the browser and log back in I can watch the process finish.

Not sure what you mean here, watch the process finish, in
what way, watching the counter count up???   I can do that
too, but it's awful slow with 10,000, plus I'm using throttle
code to slow things down, if I don't then people that try
to unsubscribe are not able to, and it hoses up other things..


Quote
It seems to work fine. except for dailymail stopping every night

Every night, how do you know it stops?  Is there anything being done about that, does Dean know about it?   Hmmm.....


I can tell dailymail stops because when I log in I see messages in queue at the top of listmail screen.  I then click resume and get a blank screen that I assume would land on a completed message of some type.  I just close all my browsers and open a new one an log back into listmail.  Every time I refreash the page or move to a different part of the listmail program I can see the number of emails in queue drop.  

In other words domail using the resume function never fails for me.  It will send 10000-20000 emails in 30min or so easy.

Like right now I see this:

Attention: You have items in the outgoing queue. Some mailings may be in progress.
 
Type            Subject  Messages Left
Dailymail       N/A          27618                Resume | Cancel

I will hit resume and they will send right away.
 


Quote
I guess I need something to just 'kick start', or 're-start' domail.php from the command line on a regular basis, like every hour or so, that way, it just starts up domail.php over and over again and I can close the browser and not have to worry about it; anybody got any ideas?

The other problem is that my domail.php tends to stop on me, even if I leave the browser open if I am doing other internet activity, it just shuts down and gives me an error to 'see Config', and that's it, I have to re-start, I believe it's a hosting issue and am curious which host I could use to prevent these problems?

Any ideas?


{url}/domail.php?list=1&resume=1&batid=50c13d would be the command line to run however, the batid I think would be different for every process started.  Not sure how to find this out until it is already stuck in queue.  Just hold your mouse over the resume link and you will see the whole URL on the bottom of the IE browser.

I need to get dailymail fixed though.  Dean any ideas.  you setup my system on the host you suggest any ideas as to why it stops?

Also, when I get the daily mail report it always says 0 followups sent.  However, I get emails to my email addresses so I know it is working to more than one.  Just not sure if they all get it.

BGSWebDesign

  • Posts: 625
    • View Profile
    • http://www.bgswebdesign.com
When will Dailymail.php be fixed?
« Reply #13 on: August 19, 2004, 06:53:29 am »
Hi,

Quote
need to get dailymail fixed though. Dean any ideas. you setup my system on the host you suggest any ideas as to why it stops?


So do I!   What's the outlook on this Dean?
Thanks,
-Brett
http://www.bgswebdesign.com/Contact-Us.php

*** I do custom List Mail Pro installations ***
Contact me through my website (above)

gwill23

  • Posts: 50
    • View Profile
    • http://www.residualenterprises.com
Test
« Reply #14 on: August 19, 2004, 09:01:28 am »
I did a send mail last night to 100,000+ on my list with the SMTP debug mode on.  Here is what I found

Sendmail stopped at 10900
SMTP Debug output


PIPELINE-FROMmsg=250 ok .
RCPT TO: <amdoi@att.net>
RCPTmsg=250 ok
DATAmsg=354 go ahead .
SENDmsg=250 ok 1092893366 qp 10501 .

PIPELINE-FROMmsg=250 ok .
RCPT TO: <ame0519@aol.com>
RCPTmsg=250 ok
DATAmsg=354 go ahead .
SENDmsg=250 ok 1092893367 qp 10576 .

PIPELINE-FROMmsg=250 ok .
RCPT TO: <ame112@aol.com>
RCPTmsg=250 ok
DATAmsg=354 go ahead .
SENDmsg=250 ok 1092893368 qp 10632 .

PIPELINE-FROMmsg=250 ok .
RCPT TO: <amee2222@yahoo.com>
RCPTmsg=250 ok
DATAmsg=354 go ahead .
SENDmsg=250 ok 1092893373 qp 10683 .

PIPELINE-FROMmsg=250 ok .
RCPT TO: <ameek@indigital.net>
RCPTmsg=250 ok
DATAmsg=354 go ahead .
SENDmsg=250 ok 1092893374 qp 10742 .

PIPELINE-FROMmsg=250 ok .
RCPT TO: <Ameenah_79@hotmail.com>
RCPTmsg=250 ok

second try
Sendmail finished all 93242

My dailymail stopped again.  It is almost like it starts and goes for just a min then dies.