Since it worked for the first 4 and not the 5th, I would try and see what's different in the 5th record's data.
How are you trying to send: through email client or SMTP settings?
Check to make sure all email addresses are valid. You can check the format with a custom function (eg FileMaker Custom Function:IsValidEmailFormat( text )) or via a web service and Insert From URL (eg http://email@example.com )
Next check would be your mail server, if 4 worked and then others didn't, maybe your being marked as a spammer for sending emails too fast? Try placing a minute pause between emails in your loop. It might also think you're spamming if all emails have the same content.
Consider using a mass email service, such as mailchimp. There was a great module for mailchimp posted to modularfilemaker: http://www.modularfilemaker.org/module/mailchimp/ that makes contact integration easy. Then you can format and send HTML emails as well.
Also, trap for errors in your script, this could help identify what the issue is.
Good idea. I am trying to send using SMTP.
Thanks for working with me on this...
How do i place a pause in my loop?
Also, what does this mean?: Also, trap for errors in your script, this could help identify what the issue is.
BTW, here's the script information:
To: Mailing List::Email
Subject: "Merry Christmas (with a present) from Galwiji Homestead."
"Dear " & Mailing List::Xn Name & "," & ¶ & ¶ &
"We are writing to thank you for staying with us at Galwiji Homestead. This has proved to be the most successful year for us since we started - and you were an important part of that. In 2014, we:¶¶
hosted our 1000th guest¶
received a Certificate of Excellence from TripAdvisor.com.au¶
created our first ever charity calendar, and received our 1000th Facebook 'like'¶
built a new deck and completed renovations to become disabled-friendly.¶¶
To thank you for your support, we'd like to offer you a special discount for a future booking:¶¶
book 2-3 nights and get $50 off¶
book 4 of more nights and get $100 off.¶¶
To take advantage of this discount, your booking must:¶¶
be made using galwijihomestead.com before 31/1/15 for a stay up to 31/12/15¶
quote 'valuedguest' in the comments.¶¶
We wish you all the best for a great 2015 and look forward to hosting you soon.¶¶
Ann, Angus, Bill & Malcolm Pryor¶¶
To unsubscribe from our emails, please just reply with the word 'unsubscribe' in the subject field.¶¶"
Try skipping the email that is causing the problem. Check Email addresses for additional spaces at beginning or end of field contents. Then run with scrip debugger and find out what is the error.
Pause is the second choice and you can set it for the number seconds you wish to have it pause for.
THank you all so much. I individually checked the emails and one of them had extra characters in the field.
Very happy! Woohoo and Merry Christmas to all of you.
What is script debugger please? I couldn't find it in any of the FM menus...
HOw do you 'trap for errors' in your script. Sorry, I'm not a particularly powerful user...
It is a feature included with FM Advanced. Were you able to get the emails to be sent?
Frustratingly, I got a buch of 60 send last night with no problems, and then this morning, it won't work again.
I don't have FM advanced - I'm not enough of a power user any more
I'm just using FM 12 garden-variety version.
Any further ideas, please let me know.
Regards and thanks. malcolm.
Again if it worked before it should work now unless there is a problem with the email address or your have exceeded the email providers throttle limits. Who is your email provider?
optusnet.com.au (I'm in Australia).
I will check again about the limits. We have had a couple of friends who have sent us rather large Christmas letters via email - maybe that was the problem...
It is not the size of an email, it is the number of emails within a time frame. If you already send a group of 55 in one run there is no reason why another 60 would not work. Unless of course the email fails due to not being a proper email format or has extra spaces at the end or beginning of the field contents or you exceed a limit set by the email provider. Google has a two thousand per day on a business email account in the U.S. Some will limit how fast you can send an email. (this is why you might want to put a pause of say 30 or so seconds in the loop of your script). The restriction could also be number per hour or day.
Trapping for errors is pretty easy:
Set Error Capture [ on ]
...your script steps...
...place below immediately after the send mail script step to trap for an error...
Set Variable [ $error ; get(lasterror) ]
if [ $error ]
show custom dialog [ "There was an error: " & $error ]
For the most part, get(lasterror) will return "0" if there was no error, or the error number if there was an error. The above will show a dialog if there was an error.
It looks like my first suggestion of making sure the email addresses were valid was your culprit.