Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Why does EMAIL_SMTP_SEND() fail 10% of the time?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Why does EMAIL_SMTP_SEND() fail 10% of the time?

    To send email I use EMAIL_SMTP_OPEN() followed by EMAIL_SMTP_SEND() and EMAIL_SMTP_CLOSE(). The open function always works but about 10% of the time the EMAIL_SMTP_SEND() fails. It is not the data that I am sending because if I immediately try the send again it will often work. EMAIL_SMTP_SEND() returns a result flag but nothing else so I can tell it failed but not why. Does anybody have any insight as to why EMAIL_SMTP_SEND() might fail?
    Thanks
    Irwin

    #2
    Re: Why does EMAIL_SMTP_SEND() fail 10% of the time?

    To send email
    Singly or in bulk (multiple)? Your isp may have a throttle on emails per minute.
    There can be only one.

    Comment


      #3
      Re: Why does EMAIL_SMTP_SEND() fail 10% of the time?

      Who is your ISP?
      Can you use another ISP - like a Gmail account?
      Al Buchholz
      Bookwood Systems, LTD
      Weekly QReportBuilder Webinars Thursday 1 pm CST

      Occam's Razor - KISS
      Normalize till it hurts - De-normalize till it works.
      Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
      When we triage a problem it is much easier to read sample systems than to read a mind.
      "Make it as simple as possible, but not simpler."
      Albert Einstein

      http://www.iadn.com/images/media/iadn_member.png

      Comment


        #4
        Re: Why does EMAIL_SMTP_SEND() fail 10% of the time?

        Yes I am sending out 30 or more at a time and once a year about 300 at a time. My ISP is go daddy. I will check with them and maybe put in a delay between sends.
        Thanks.

        Comment


          #5
          Re: Why does EMAIL_SMTP_SEND() fail 10% of the time?

          [QUOTE=Al Buchholz;6299239
          Can you use like Gmail account?[/QUOTE]
          Al Buchholz
          Bookwood Systems, LTD
          Weekly QReportBuilder Webinars Thursday 1 pm CST

          Occam's Razor - KISS
          Normalize till it hurts - De-normalize till it works.
          Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
          When we triage a problem it is much easier to read sample systems than to read a mind.
          "Make it as simple as possible, but not simpler."
          Albert Einstein

          http://www.iadn.com/images/media/iadn_member.png

          Comment


            #6
            Re: Why does EMAIL_SMTP_SEND() fail 10% of the time?

            Actually my isp is time warner and my email server is godaddy. I will have to check with both and I guess I could make time warner my email server too.

            Comment


              #7
              Re: Why does EMAIL_SMTP_SEND() fail 10% of the time?

              Thanks Al, I could try gmail. At least I should do some testing with different email servers if you think the problem is not in the EMAIL_SMTP_SEND().
              Irwin

              Comment


                #8
                Re: Why does EMAIL_SMTP_SEND() fail 10% of the time?

                Seems like a good place to promote REA's Email Queue system. I have adopted this for anywhere that I am sending more than one email, or if the email is critical, which is everywhere. He has a simple system to post the email to a queue rather than sending immediately. Then it goes to work sending the emails in a different session, not impacting your user or current session at all. It is totally managed so you can see what emails have and have not sent at any given moment, and it will keep trying up to ten times without your involvement, and you can investigate any that fail 10+. I will let Earl chime in here and explain it in more detail.
                Steve Wood
                See my profile on IADN

                Comment


                  #9
                  Re: Why does EMAIL_SMTP_SEND() fail 10% of the time?

                  Hi Irwin,

                  We created an email queue for the same reason. A few of our applications require that emails are always successfully sent, and we found that we couldn’t depend on the email_smtp_Send() call.

                  If you use my software, you don’t have to change much in your code. Just replace the call to the email_smtp_send() with a call to am_QueueEmail().

                  An advantage to using our system is that you can also queue an email for a future date/time. This would allow you to send an email now, and a reminder in 15 days.

                  We provide you with examples, full documentation and working a5w scripts to process the email queue, which you can customize to your heart’s content (or to meet customer’s requirements ;-). You will need to setup additional tables in your database and also setup a cron type scheduler to run the script (we suggest pycron).

                  If you're interested, here’s a link to the software on Steve's site with some more information: http://www.alphadevnet.com/store.a5w...REA_AUTOMAILER

                  If you are interested in a copy of the manual, send me a private email here, with your actual email address, and I'll forward a copy to you.

                  Thanks,

                  Earl Allin
                  REA Inc.
                  Earl Allin
                  REAInc.net

                  We can help you with mentoring and custom programming services in Alpha, .NET, React, PHP, ColdFusion, and more..

                  Comment


                    #10
                    Re: Why does EMAIL_SMTP_SEND() fail 10% of the time?

                    Thank you Steve and Earl. I want to do some testing first. I think the system you describe sounds great but maybe more than I need. I might modify my own code to resend the failed emails since I really do not need a scheduler. Let me work on this a bit. If I find anything useful I will get back.
                    Thanks again,
                    Irwin

                    Comment


                      #11
                      Re: Why does EMAIL_SMTP_SEND() fail 10% of the time?

                      I know it goes through my Store so my comments might appear self-serving; but I really am a happy user of this Email Queue product. I put it in my Web Framework and it is running on www.alphadevnet.com and www.alphatogo.com. Before this I DID have code that tried to send the email up to five times, with a .25 second sleep in between. What ends up happening is that the poor user sits and waits forever for the screen to return to their control. (That may not be applicable in your case.) If you really wanted to be sure it was sent, you would have to post everything about the email to a table so you can view those results AND be able to resend the email if it failed for all attempts. My re-try code was similar to below:

                      result = email_send2() -- or email_smtp_send...
                      for x = 1 to 5
                      if result = .t.
                      exit for
                      end if
                      result = email_send2() -- or email_smtp_send...
                      next
                      For my own use, I created this view of my Email Queue and added some features to purge the succesful ones (see attached image).
                      Attached Files
                      Steve Wood
                      See my profile on IADN

                      Comment


                        #12
                        Re: Why does EMAIL_SMTP_SEND() fail 10% of the time?

                        Maybe not what you are looking for:

                        I used to send 2500 to a big bunch at a time with my own code in alpha desktop v7. I set the app to send 27 at a time(going on memory), wait 5(I think) minutes and send 27 more. This was to get around the roadrunner that shut me down if I sent too many at a time. It is a spamming policy of theirs. While the emails were going(it took a lot of time with that many), the user could go on about other business.

                        Basically, it checked a record for a proper email address and if found was copied to a temp table where one record at a time was emailed and the each record down the line from there. Each record had a logical field when completed or failed. The failed ones were tried again and again up to 5 times.

                        At least, I know it can be done. Probably easier to use the application on IADN site.
                        Dave Mason
                        [email protected]
                        Skype is dave.mason46

                        Comment

                        Working...
                        X