I used a similar code. Actually what I had to do was put the original
code (the one quoted in my first email on this) in a prg, called from
the form
I had this code within a loop (that iterated some 400 times) in my
send_email form. But it would not work. When I took the code out of the
form and placed it into a prg, it worked!
A pseudocode of my form calling the prg is:
select curInvoices
scan all
cTo = alltrim(curInvoices.email) && get the email from each
customer
cAttach = alltrim(curInvoices.invoice) && contains path to the
pdf and its individual name
do sendemail with cTo,cAttach
endscan
I also put a counter to iterate 10 times, then wait 15 seconds and then
pick another ten emails and so on. This is to avoid gmail rejecting a
big load of emails sent at once.
Of course I had to turn on the 'less secure apps' setting on the Gmail
account first, and then it worked perfectly.
I wonder why it would not work with the cdo code directly on the form.
BTW, my client runs this app from a Windows 7 prof computer, for what
its worth.
Thank you all for your suggestions
Rafael Copquin
El 26/09/2017 a las 7:54, Alan Bourke escribió:
I've just tested this code and it sent successfully, but not until I
turned on the 'less secure apps' setting on the Gmail account.
https://gist.github.com/anonymous/ddb479e315bcc45efb0d4703fc05b836
---
Este correo electrónico ha sido comprobado en busca de virus por AVG.
http://www.avg.com
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message:
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.