Jump to content

bazzer747

Members
  • Content Count

    184
  • Joined

  • Last visited

Posts posted by bazzer747


  1. Hi,

    I have an Delphi 10.4 VCL app which connects to a remote MSSQL Server. This app works fine on my development PC and the Firedac setup is the same as I have on other apps I've created.

     

    However, whist these other apps also work fine on my clients PCs this particular app gives the above error message (snap attached). It would appear there is a difference in this app to the others but I cannot see any. I've created a small app which solely connects to MSSQL and this fails on these PCs also, which now makes me think there is something not setup correctly on their PCs.

     

    Any thoughts as to why I am getting this error would be appreciated. 

     

    xx.jpg


  2. Done some further testing. The emails with PDF attachments can be opened and read on iPhone/iOS version 14.7.1. I also had someone with iOS 15.3.1 who could open a PDF OK. It seems those with iOS 15.4 are the ones having the problem. In the UK that was released March 14th.


  3. Many thanks for  taking the time to help with this issue. I've changed my code to reflect what you are suggesting so again thanks for explaining that. I pick up bits and pieces from different places and sometimes they do end up a bit haphazard. Forget the attachment, it was early in changing the code, I had a create in the wrong place.

     

    This is the first time my User has used Indy to send emails with attachments (as he doesn't have Outlook), previously all emails with attachments have been sent by Outlook. And these have been sent to iPhone, Android mobiles, PCs etc. with no problems. From that it would appear to be an Indy issue, would you agree? Although I have one User, who has an old iPhone (with an older version of iOS) who receives these messages and can open the PDFs OK. That would indicate a later iOS might have something to do with the problem.

     

     

    AccessViolation.jpg


  4. Thanks, qubits, I've Googled this and there's a mass of items about issues with PDFs sent to iPhones. Most talk of the obvious, like corrupt PDFs or incompatible formats and lots from way back. Trying to figure which if any relate to my issue is difficult, but I'll pursue. 

     

    Remy, I can send the same email (with a PDF attached) from Outlook or from Indy to myself on a PC and on an Android phone (a gmail account) and they arrive OK with the attachment which I can open OK. Here is the gist of the code which I use:

     

    procedure CreateIndyEmail( xMsg:string; xFirstName:string; xNameid:integer; xEmail: String; xSubject:string );
    var
      DATA: TIdMessage;
      SMTP: TIdSMTP;
      SSL:  TIdSSLIOHandlerSocketOpenSSL;
    begin
    DATA:= TIdMessage.Create(nil);
    with DATA do
      begin
        Clear;
        ContentType := 'text/html';
        ContentType := 'multipart/mixed';
        Subject     := xSubject;
      end;
    IdOpenSSLSetLibPath( cLoc );
    SSL:= TIdSSLIOHandlerSocketOpenSSL.Create(nil);
    With SSL do
      begin
        Destination           := 'smtp.xxvemail.co.uk';
        Host                  := 'smtp.xxvemail.co.uk';
        SSLOptions.Mode       := sslmClient; // was sslmUnassigned;
        Port                  := 587;  //465; ;
        SSLOptions.Method     := sslvTLSv1_2;   // originally sslvTLSv1; Fasthosts suggeted change
        SSLOptions.Mode       := sslmUnassigned;
        SSLOptions.VerifyMode := [];
        SSLOptions.VerifyDepth:= 0;
      end;
    SMTP:= TIdSMTP.Create(nil);
    with SMTP do
      begin
        IOHandler            :=  SSL;
        UseTLS               :=  utUseExplicitTLS;
        Host                 := 'smtp.livemail.co.uk';
        Port                 :=  587; 
        AuthType             :=  satDefault;
      end;
    DATA.Recipients.EMailAddresses:= xEmail;
    SMTP.password              := 'xyz';
    SMTP.username              := 'Seniors@xyz.com';
    DATA.From.Address          := 'Seniors@xyz.com';
    DATA.Sender.Address        := 'Seniors@xyz.com';
    DATA.ReplyTo.EMailAddresses:= 'Seniors@xyz.com';
    with TIdMessageBuilderHtml.Create do
      try
        Html.Text := xMsg;
        if gvbAttached = True then HtmlFiles.Add( gvAttachedFile );
        FillMessage( DATA );
      finally
        Free;
      end;
    try
      SMTP.Connect;
      SMTP.Send( DATA );
    finally
      SMTP.Disconnect;
    end; 


  5. I send many emails out which have PDF attachments and usually via Outlook. However, I also provide the ability to send the same emails with the same PDF attachments via Indy.

     

    If the emails go to a Windows PC, or to an Android mobile they arrive correctly and the PDF attachment can be opened and viewed correctly. However, when these same emails go to iPhones the PDF shows as an attachment to the email but cannot be opened. Except if the iPhone is an old model and not at the latest version it can open PDFs from the email.

     

    Is this a known issue, or maybe a problem that Indy is aware of and can provide a solution?


  6. Hi

    I have a stringgrid which has a height of about twice the height of the text that is entered in it (the right side in the attached).  I think the display would look much better if I could align this text vertically in the centre, rather than at the top of the cell.VerticallyAlign.thumb.jpg.4b26d1ce79c1ac91729c96edf843483e.jpg

     

    I've tried to figure out if there is a setting somewhere but can't find one (if one exists).

     

    Any help would be appreciated.


  7. And on Monday, 13th December at 14:18 in the RTL & Delphi Object Pascal forum, just as I said. Perhaps you didn't understand my comment when I said I'd posted the question on a different forum (which I thought was maybe the wrong one)?

     

    I have the utmost respect for anyone who helps with queries as it certainly helps me understand this great language. As I always ask for suggestions and not solutions I can then think my way into the problem if given an idea of how to progress.

     

    I've always though Praxis and StackFlow are completely different forums and often see similar questions posted on both forums.


  8. That's untrue. I posted the question a few days ago on a different forum, but when I received no replies I thought I had posted it in the wrong forum. Hence I re-posted it in what I then considered a more appropriate forum. As I look at Stackflow a lot it s4eemed reasonable to see if anyone different had any thoughts.

     

    I was not assuming peoples time is less important, I value both forums and everybodies time as important to me and am very thankful. Do not assume the worst of people.


  9. Hi,

    I create emails in HTML using the following code to display a signature in the message:

    cMsg:= cMsg + ' <img src="BarrysSignature.jpg" '>

    Which means I need to have the jpg available in the current directory (and distribute it with the executable).

    I also use these same signature jpgs elsewhere in my program as I've loaded them as resources. What would be better is if I used the resource for the signature in the email, rather than the external jpg picture.

     

    I've tried a few ways of doing this but can't get it working. Any thoughts, please?


  10. Hi,

    I create emails in HTML using the following code to display a signature in the message:

    cMsg:= cMsg + ' <img src="BarrysSignature.jpg" '>

    Which means I need to have the jpg available in the current directory (and distribute it with the executable).

    I also use these same signature jpgs elsewhere in my program as I've loaded them as resources. What would be better is if I used the resource for the signature in the email, rather than the external jpg picture.

     

    I've tried a few ways of doing this but can't get it working. Any thoughts, please?


  11. Hi,

    I didn't renew my subscription for my 10.4.1 Delphi Enterprise when it expired last October. I may renew again in a few years if/when the additions make it worthwhile.

     

    However, now when I open GetIt I see the update shown in the attached screenshot - a 10.4.2 Installer, which says 'Included with your Update Subscription'.

     

    My confusion is if my subscription ended last October, why is this shown in GetIt, unless Embarcadero (in their wisdom) are allowing me to upgrade my 10.4.1 to 10.4.2?

    GetIt.jpg


  12. Alongside each other on a form I have a CheckList and a ListBox. As I scroll down the CheckList (on the left side) box I want the ListBox (on the right side) to also scroll down, but at half the speed. The left side has 64 rows (col height 30)  , the right side 32 rows (col height 60).  As the scrolling goes through the 64 rows on the left side two rows at a time I want the right side to scroll down one row at a time. The application monitors progress of a knockout competition.

     

    Currently I try this using the following procedures to synchronise the vertical scrolling:

     

    procedure TForm1.Grid1WindowProc(var Message: TMessage);
    begin
      OldGridProc1(Message);
      if ((Message.Msg = WM_VSCROLL)) then OldGridProc2( Message );
    end;

    procedure TForm1.Grid2WindowProc(var Message: TMessage);
    begin
      OldGridProc2( Message );
      if (( Message.Msg = WM_VSCROLL )) then OldGridProc1( Message );
    end;

     

    In the form activate I have this:

    OldGridProc1:= sgLastRound.WindowProc;  

    sgLastRound.WindowProc := Grid1WindowProc;
    OldGridProc2:= gsgNextRound.WindowProc;

    gsgNextRound.WindowProc:= Grid2WindowProc;

     

    And this works correctly scrolling each side BUT at the same amount. What I'm after is the right side to scroll at half the amount of the left side. I can't see where I can divide the right side movement by 2 so it goes half the distances. Sorry if this isn't that clear. The attached screenshot may help visualise the problem.

    Scrolling.jpg


  13. Hi,

    Sorry it took so long, just been able to get to my client to take a look at his registry.

     

    There are 2 entries:

     

    Outlook.Application - Microsoft Outlook 15.0 Object Library

    and

    Outlook.Application 15 - Microsoft Outlook 15.0 Object Library

     


  14. Hi,

     

    When I create emails in Outlook using below code they all work without a problem. I'm using Office365, so the latest version of Outlook.

     

    However, when that same code is executed on a different PC, and one that uses Outlook 2013, I get 'Server execution failed, ProgID: 'Outlook Application'

     

    The start code for the email application is:

        try
          Outlook:= GetActiveOleObject('Outlook.Application');
        except
          Outlook:= CreateOleObject('Outlook.Application');
        end;

     

    When I google I get various replies to this issue (some of which are not a solution here), but wondered if any Delphi guys have hit this problem and know of a solution. Maybe a different way to open an Outlook instance?


  15. Am I an idiot for not checking before post. Yes, wrong forum (I was working with Indy just prior and brain didn't disengage when I did this post, sorry). AND, a typo, the failure was on Outlook 2013 not Outlook 2003! 

     

    I've since tested on Outlook 2010 and the code works fine. I'm thinking it's more of a permission thing on the client's PC, rather than Outlook itself. 

     

    However, I'll shift this post to the correct forum now ...


  16. Hi,

     

    When I create emails in Outlook using Indy they all work without a problem. I'm using Office365, so the latest version of Outlook.

     

    However, when that same code is executed on a different PC, one that uses Outlook 2003, I get 'Server execution failed, ProgID: 'Outlook Application'

     

    The start code for the email application is:

        try
          Outlook:= GetActiveOleObject('Outlook.Application');
        except
          Outlook:= CreateOleObject('Outlook.Application');
        end;

     

    When I google I get various replies to this issue, but wondered if any Delphi guys have hit this problem and know of a solution. Maybe a different way to open an Outlook instance?


  17. Hi,

     

    When I raise a new topic I always check the 'Notify me of replies'. Fairly obvious, I suppose, as I don't log in every day. Which is great.

     

    However, on several topics I've raised, the subject matter being discussed does occasionally tend to drift off the main thread. Sometimes interestingly, sometimes not.

     

    It would be a nice addition if you could uncheck the 'Notify me of replies' when the latter happens. No big deal, just a thought ...


  18. In the early days (Delphi 3 and up), I bought every book there was and they really helped. Much better than online documentation. However, over the years I used them less often and eventually (under pressure from other half!) had to get rid of them. Space was the issue, plus I looked at them less frequently. I regret that now.

    Most of the Delphi books out there now are generally quite advanced and very expensive.

×