These are chat archives for IndySockets/Indy

9th
Feb 2017
ntsmkfob
@ntsmkfob
Feb 09 2017 18:19
Hi all, up to now, we've used Indy to send email to our sports club members using our ISP (BT Business). We would send an email containing 20 BCCs and throttle the throughput to keep in the ISPs volume limits per hour. That went out of the window when they switched to using Outlook.com to host their emailing. We've switched to using an SMTP service (AuthSMTP) who recommend sending individual emails, no BCC. The old way had a fair processing overhead, but that didn't matter as there would be a minimum of 10 secs interval between emails. Now I want to basically loop through the recipient list as fast as possible - basically Connect, loop through list clearing and building headers, Send and finally Disconnect., rather than Connect, Send one email, Disconnect and loop. Am I digging a hole for myself?
Marcelo Lauxen
@marcelolx
Feb 09 2017 19:37
Hey people, i have a doubt
specifically at the TIdFTP component on the palette Indy Clients, Delphi XE2
I intend to to upload and download files from my ftp server, and keep the file modification date, is it possible?
I not found anything at the docsite of IndyProject, related this, but it's possible or not?
Sorry my bad english
Remy Lebeau
@rlebeau
Feb 09 2017 19:58
@ntsmkfob if you are sending all of the emails using the same SMTP server, you don't need to disconnect between individual emails, you can send more than one email per login session. Connect, send send send, disconnect. The alternative is to stop using 3rd party email services altogether and just send your emails directly to each recipient's email server directly. Indy even has a TIdSMTPRelay component for that very purpose. It scans an email's recipients list and separates the recipients based on their domains, and then it uses DNS to locate each domain's receiving server, and then finally connects to each domain sending the email to all recipients within the domain. Just be careful, because this is the same thing spammers ted to do, and you might get blacklisted by some servers. This is generally why you should send emails using an ISP or intermediary service that has already been whitelisted (consider using a mailing list service, like Yahoo Groups, instead of sending emails to individual recipients, that way you only have to send 1 email on your end and let the service propegate it through the membership for you).
@marcelolx When uploading files, TIdFTP has a SetModTime() method for setting the modification time of a remote file, if the server supports the MFMT or MDTM command. When downloading a file, you have to set the modification time of the local file manually. On Windows, you can use Delphi's SysUtils.FileSetDate() function, or the Win32 SetFileTime() function directly, for that purpose.
ntsmkfob
@ntsmkfob
Feb 09 2017 21:32
Thank you Remy. I'll try the send,send,send approach, as it means removing code instead of writing new stuff. Thanks for your help.