multiple emails

Questions, tips and tricks and techniques for scripting in Servoy

multiple emails

Postby kurtbleicken » Thu Sep 01, 2011 9:46 pm

I'm starting to work on a method that would loop through a list of contacts and send an individual email to each one. Are there pitfalls here? Are there limits to how many emails you can send using such a method, say 100 to 500?
Kurt Bleicken
Servoy 7
Executive Director, onRamp for nonprofits
kurtbleicken@gmail.com
Founder, AgentSphere, LLC
kurtbleicken@gmail.com
603.525.8019
kurtbleicken
 
Posts: 100
Joined: Mon Feb 12, 2007 11:36 pm

Re: multiple emails

Postby ROCLASI » Thu Sep 01, 2011 9:54 pm

Hi Kurt,

One email for each contact ? No, why would there be a limit ?
Now sending one email to a bunch of receipients is another things. Then you are limited by the size of the receipient field. So it's not record related but total string size related.
I am not sure what the limit is and it might differ from mailserver to mailserver. Google is your friend here.

Hope this helps.
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Re: multiple emails

Postby kurtbleicken » Thu Sep 01, 2011 10:16 pm

Thanks Robert,

I'm not talking about putting multiple recipients in email to field. Just one email to per email. So I'll guess I'll give it a go.

Thanks for your help. K
Kurt Bleicken
Servoy 7
Executive Director, onRamp for nonprofits
kurtbleicken@gmail.com
Founder, AgentSphere, LLC
kurtbleicken@gmail.com
603.525.8019
kurtbleicken
 
Posts: 100
Joined: Mon Feb 12, 2007 11:36 pm

Re: multiple emails

Postby ROCLASI » Thu Sep 01, 2011 10:25 pm

Hi Kurt,

Just realise that if you let a servoy client do the sending things will be quite slow because it waits for each email to be send. And when an email can't be send for whatever reason (remote server might be busy/down or there is simply a routing issue) the email falls into a black hole.
I tend to use a seperate mailqueue table for this that a Servoy client can fill with all the emails it sends. Then I use a batchprocessor to process this queue and keep an error count and error message on each record. When a record can't be send for 3 times I mark it as disabled and won't be processed anymore (until you fixed the issue and enable it again).
This way no emails will be lost and you keep track on the ones that causes trouble and can act accordingly.

Hope this helps.
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Re: multiple emails

Postby Gordon » Fri Sep 02, 2011 8:07 am

ROCLASI wrote:Hi Kurt,

Just realise that if you let a servoy client do the sending things will be quite slow because it waits for each email to be send. And when an email can't be send for whatever reason (remote server might be busy/down or there is simply a routing issue) the email falls into a black hole.
I tend to use a seperate mailqueue table for this that a Servoy client can fill with all the emails it sends. Then I use a batchprocessor to process this queue and keep an error count and error message on each record. When a record can't be send for 3 times I mark it as disabled and won't be processed anymore (until you fixed the issue and enable it again).
This way no emails will be lost and you keep track on the ones that causes trouble and can act accordingly.

Hope this helps.


That is excellent and timely advice thanks for this ....!
Gordon McLean
Click Digital Media Ltd
SAN Developer
www.clickdigital.com
User avatar
Gordon
 
Posts: 265
Joined: Thu Mar 17, 2005 8:05 pm
Location: UK

Re: multiple emails

Postby Harjo » Fri Sep 02, 2011 12:05 pm

You can also use the mailPro plugin of DrMaison, that one, opens the smtp connector only once, send your email in bunches and close the smtp connector again.
The mail-plugin of Servoy, does opening & closing the smtp connector for every email, which also, slows it down.

Also the mailPro plugin, can send email in the background (in a separate thread) which is very fast!!

We have built (a while ago) a send mailletter solution, that sends 50.000 emails, every month! How quick that goes, does also, totally depends on what mail/smtp-server you use, and what kind of bandwith you have.
Servoy can handle this really fast, but sometimes, slower smtp servers, also queues, the mail, and send it one-by-one.
More advanced mail-servers, can send email in multiple threads....

Also be aware that some internet providers, are locking you down, when you send more than 1000 mails or so, in an hour. (Most of the time, that suggests you have somekind of unwanted bot-virus)
(dont' blame me for spamming!! :lol: )
Harjo Kompagnie
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Re: multiple emails

Postby Thomas Parry » Fri Sep 02, 2011 4:35 pm

Yeah,
I ran into the ISP limitations on how many emails are allowed be sent daily! 300!
So I had to change the entire email approach. Now I use an email list on the ISP and just send one email to it to be distributed. But this is not preferred.
I guess I should go find another provider that allows this bulk email and does not block.
Tom Parry
Prospect IT
Java/C++/Servoy/Jasper Reports/Simulation/Service Applications
http://www.prospect-saas.biz
Thomas Parry
 
Posts: 498
Joined: Thu Jan 10, 2008 8:48 pm
Location: Ottawa, Canada


Return to Methods

Who is online

Users browsing this forum: No registered users and 9 guests