Say I have a database with 5 email addresses, and i have a contact form.
Each time a user submits the contact form, the form will need to submit the details to one of my stored email addresses. This i can handle but i start getting confused as to how i will get it to *share submissions with the emails.
IE. I need to share the load between the email addresses. each time the contact form is submitted it will need to send to the next email address in my table. Then start from the beginning when it reaches the last email.
Sorry if this is a serious beginner question, i just cant seem to think of the best way to do this.
You could think of an extra column in the email table called
sendcountwith default 0. In the script where you want to find out which address to send an email to, do the following:This way you will always send the email to the address with the smallest count!