Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Email and FTP no longer working
#2
(06-13-2023, 06:01 PM)OldBob1938 Wrote: Hi, my program which uses indy 10.6.2.0 was working fine until the beginning of June.

So, what changed at the beginning of June? Did you change your code? Did your service provider(s) change their system(s)? Things don't just break out of thin air. Something had to have changed to make your project stop working.

(06-13-2023, 06:01 PM)OldBob1938 Wrote: It will no longer send emails or ftp.

Can you be more specific? Are you getting compiler errors? Runtime errors? What do they say?

Also, what does your configuration of TIdSMTP (and TIdFTP?) look like? Especially in regards to authentication? Service providers do change their authentication requirements over time. And right now, a lot of service providers are switching to newer TLS versions, and/or to OAuth2, etc. So, it might just be that your code is simply outdated for your service provider's needs. Maybe they cut over to a new system at the beginning of June, and you didn't get your code ready in time.

(06-13-2023, 06:01 PM)OldBob1938 Wrote: My sending code is below and errors skip the first to Catch attempts.

As well they should, because Indy is written in Delphi not C++, so it will NEVER throw exceptions that are derived from C++'s std::exception class, so your catch statements for catching STL exceptions will NEVER be executed, only the final catch(...) will execute.

If you want to catch Delphi-style exceptions, you need to catch (descendants of) the Delphi RTL's Sysutils::Exception class instead, eg:

Code:
...
try
{
    gSMTP->Send(idMsg);
    MessageSent = true;
}
catch(const Sysutils::Exception& e)
{
    // specific handling for all exceptions extending Sysutils::Exception
    //std::wcerr << L"Error occurred: (" << const_cast<Sysutils::Exception&>(e).ClassName().c_str() << L") " << e.Message.c_str() << std::endl;
    BobMessage("Error occurred: (" + const_cast<Sysutils::Exception&>(e).ClassName() + ") " + e.Message);
    MessageSent = false;
    Close();
}
...

Reply


Messages In This Thread
Email and FTP no longer working - by OldBob1938 - 06-13-2023, 06:01 PM
RE: Email and FTP no longer working - by rlebeau - 06-15-2023, 08:02 PM
RE: Email and FTP no longer working - by rlebeau - 06-19-2023, 10:59 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)