Alpha Video Training
Results 1 to 7 of 7

Thread: email Send

  1. #1
    "Certified" Alphaholic Tom Henkel's Avatar
    Real Name
    Tom Henkel
    Join Date
    May 2002
    Location
    New Jersey, USA
    Posts
    1,875

    Default email Send

    I have a customer that needs to send out pdf reports via e-mail. I am able to create the reports just fine, and am able to manually step through the email loop without a problem. However, when I let the script run by itself without human intervention, I keep getting errors. Has anyone out there encountered this issue? I have a feeling it is a timing problem, but would like to know how to resolve it.

    Here is the code loop:
    Code:
    tbl1.fetch_first()
    dim I as N
    I=0
    while .not.tbl1.fetch_eof()
    	if .not. marked("clients")
    	I=I+1
    		pdf_filename = "C:\Forecast\reports"+chr(92)+trim(tbl1.location)+"_Pavement_forcast.pdf"
    		msg_text = "Attached is the Pavement Condition Forcast for "+strtran(tbl1.location,"_"," ")
    		param_to = trim(tbl1.Email_addr)
    		param_subject = "Pavement Condition Forcast Test"
    		param_cc = ""
    		param_bcc = ""
    		param_msg = msg_text
    		param_attachments = pdf_filename
    		email_Send(param_to,param_subject,param_msg,param_attachments)
    		sleep(1)
    	end if
    	tbl1.fetch_next()
    end while
    PleaseWait()
    ui_msg_box("Note",alltrim(str(I))+" Reports Mailed")
    tbl1.close()
    Attached is the error message.

    Thanks,

    Tom

  2. #2
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default Re: email Send

    I remember some threads about exceeding the limits imposed by the isp (emails per minute or such). How many emails are you trying to send?
    There can be only one.

  3. #3
    "Certified" Alphaholic Tom Henkel's Avatar
    Real Name
    Tom Henkel
    Join Date
    May 2002
    Location
    New Jersey, USA
    Posts
    1,875

    Default Re: email Send

    Currently there is a maximum of 69, that may go up if we're real successful, but I am only testing with 9, and it gets hung up somewhere in those. I didn't track where it stopped.

    Thanks,

    Tom

    Just tried again with a 3 second "sleep" after the email_send() attached is the email server error.
    Last edited by Tom Henkel; 11-03-2009 at 06:25 PM. Reason: more info

  4. #4
    Volunteer Moderator Steve Workings's Avatar
    Real Name
    Steve Workings
    Join Date
    Apr 2000
    Location
    The Dreaded Chair
    Posts
    5,612

    Default Re: email Send

    I do this all the time Tom and don't immediately see a problem. Your sleep(1) should be sufficient, but maybe try it at 5.

    Another solution is to gather groups of email addresses into the BCC field. I've played with that and had decent success, but I haven't implemented it in production. If I recall, I was putting up to 20 BCC addresses in at once with no problem - the limit may be higher than that, and my recollection is a bit fuzzy. But, it's a lot faster, and may resolve your problem.
    -Steve


  5. #5
    "Certified" Alphaholic G Gabriel's Avatar
    Real Name
    G. Gabriel
    Join Date
    Oct 2004
    Posts
    7,204

    Default Re: email Send

    Most ISP's will limit how many emails go out from one IP within a certain period of time as an effort to limit spam. They do so by blocking port 25.

    Optonline definitly limits that number. Of course they are not about to tell you what the limits are.

    To get around this, either:
    1-space them out (this is all trial and error, start with smaller number and increase until you get the error) or,
    2-If the settings in your email allow, uncheck to bypass sending emails through the ISP SMTP server, or
    3-Send the email from your website, or
    4-If you have a business account with your ISP, call them and see if they can unblock port 25, or
    5-Use port 587 instead, if available.

  6. #6
    "Certified" Alphaholic Tom Henkel's Avatar
    Real Name
    Tom Henkel
    Join Date
    May 2002
    Location
    New Jersey, USA
    Posts
    1,875

    Default Re: email Send

    Thanks, all.

    Steve, the problem is that each report is tailored to a specific client, can't use bcc.

    G. I was talking with someone this morning, and we came to the same coclusion. The ISP is definitely blocking. In my trial, I ran with a 6 second delay, and after about 15-20 e-mails, everything stopped. I was using optonline. My client has verizon.net. I will request that he get a true business account so that we can finish this project.

    Tom

  7. #7
    "Certified" Alphaholic G Gabriel's Avatar
    Real Name
    G. Gabriel
    Join Date
    Oct 2004
    Posts
    7,204

    Default Re: email Send

    Ever wonder how spamers get around that?
    I am not well versed (in fact have no clue) about spamming techniques, but my understanding is that they use (or used to use) phony emails as the "From" to trick the ISP. The ISP's got wise and instead of checking the "From" email address, rather they check the IP address. You don't think that would stop the spammers? Of course not. They used "Zombie" web sites to send the emails out of since websites use port 587 not port 25. The ISP's haven't figured out how to get around that one yet. How can you tell a legitimate Newsletter from a spam. If ISP's stop those, you won't get alpha's newsletters or emails.
    How do you send mass emails from a website and not from your email client?
    Hmmmm.. that's a completely different horse.

    Ever wonder how alpha sends mass emails?

    Go Saints! 7 and O and counting!

Similar Threads

  1. send email to currentform.controls.email
    By patbennett in forum Application Server Version 9 - Web/Browser Applications
    Replies: 4
    Last Post: 08-26-2009, 09:22 PM
  2. Email will not send on hosted Application Server. Email Profile name?
    By iviowa in forum Application Server Version 9 - Web/Browser Applications
    Replies: 4
    Last Post: 11-17-2008, 07:50 PM
  3. email send
    By alicemay in forum Alpha Five Version 7
    Replies: 1
    Last Post: 12-05-2006, 10:50 AM
  4. Can not send Email
    By masterchuck in forum Alpha Five Version 7
    Replies: 6
    Last Post: 12-09-2005, 01:26 PM
  5. How To: send email
    By Rick Valenzuela in forum Alpha Five Version 5
    Replies: 2
    Last Post: 09-30-2003, 01:08 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •