grantful
-
Content Count
79 -
Joined
-
Last visited
Posts posted by grantful
-
-
Thanks remy i will look into it some more tomarry after work.
-
-
i am using Delphi 11CE
I am trying to send a basic email with indy;
procedure SendTestEmail2; var SMTP: TIdSMTP; Message: TIdMessage; SSLHandler: TIdSSLIOHandlerSocketOpenSSL; begin SMTP := TIdSMTP.Create(nil); Message := TIdMessage.Create(nil); //SSLHandler := TIdSSLIOHandlerSocketOpenSSL.Create(nil); SSLHandler.SSLOptions.Method := sslvTLSv1_2; // or sslvTLSv1, sslvTLSv1_1, etc. try SSLHandler.SSLOptions.Method := sslvTLSv1_2; SSLHandler.SSLOptions.Mode := sslmUnassigned; SSLHandler := TIdSSLIOHandlerSocketOpenSSL.Create(nil); SMTP.IOHandler := SSLHandler; SMTP.Host := 'smtp.gmail.com'; SMTP.Port := 465; // or 465, depending on your server SMTP.UseTLS := utUseExplicitTLS; // or utUseImplicitTLS SMTP.Username := 'UserName'; SMTP.Password := 'Pass'; Message.From.Address := 'men@gmail.com'; Message.Recipients.EMailAddresses := 'grantful@yahoo.com'; Message.Subject := 'Test Subject'; Message.Body.Add('Test message.'); try SMTP.Connect; SMTP.Send(Message); except on E: Exception do begin ShowMessage('Error: ' + E.Message); end; end; finally SMTP.Free; Message.Free; SSLHandler.Free; end; end;
Never worked with indy before .
on the android phone i get Error Sending Email External exception 4e
on my iphone i get error Sending Email: acces violation at address0000000000104b-d0788
Thanks for any help and or point me to a working example.
-
Well Dave sorry to ask that question .
I reboot my computer and start over again and it compiles.
-
Hey Dave I compiled the demo and it works great .
I am trying to implement the share into my project and i am getting
[DCC Error] Macapi.ObjectiveC.pas(3145): E2003 Undeclared identifier: 'SObjCClassRegistrationFailed'
I have looked at the uses clause in the demo and I have the same thing in mine. I am sure i am not including something.
Thanks for your help.
-
Ok thank you for your hard work with that.
- 1
-
Dave that works great.
I am wondering about using a 3rd party method(component, pas, class, etc) in the app. I worried about in the future if the Kastri project will be updated to work with newer versions of Delphi .
Thanks for your help
-
Thanks Dave. I thought i could send a file with the share sheet . I am trying to learn 😉
-
I have a sqlite database file( app.s3db) in my app i wold like to send with share sheet to back up to email ,etc .
I am working on a class to do this but have an error.
unit ShareDatabaseFile; interface uses System.SysUtils, System.Classes, FMX.Types, FMX.Controls, FMX.MediaLibrary.Actions, FMX.Dialogs, FMX.ActnList; type TDatabaseFileSharer = class(TComponent) private FShareSheet: TShowShareSheetAction; FActionList: TActionList; procedure DoBeforeExecute(Sender: TObject); // Declaration public constructor Create(AOwner: TComponent); override; destructor Destroy; override; procedure ShareDatabaseFile; end; implementation uses System.IOUtils; { TDatabaseFileSharer } constructor TDatabaseFileSharer.Create(AOwner: TComponent); begin inherited; FActionList := TActionList.Create(Self); FShareSheet := TShowShareSheetAction.Create(Self); FShareSheet.ActionList := FActionList; FShareSheet.OnBeforeExecute := DoBeforeExecute; // Assignment end; destructor TDatabaseFileSharer.Destroy; begin FShareSheet.Free; FActionList.Free; inherited; end; procedure TDatabaseFileSharer.DoBeforeExecute(Sender: TObject); // Implementation var DatabaseFilePath: string; begin DatabaseFilePath := TPath.Combine(TPath.GetDocumentsPath, 'mydatabase.db'); if TFile.Exists(DatabaseFilePath) then begin FShareSheet.SharedFileName := DatabaseFilePath; end else begin ShowMessage('Database file not found.'); Abort; end; end; procedure TDatabaseFileSharer.ShareDatabaseFile; begin FShareSheet.ExecuteTarget(nil); end; end.
I am getting undeclared identifier
procedure TDatabaseFileSharer.DoBeforeExecute(Sender: TObject); // Implementation var DatabaseFilePath: string; begin DatabaseFilePath := TPath.Combine(TPath.GetDocumentsPath, 'mydatabase.db'); if TFile.Exists(DatabaseFilePath) then begin FShareSheet.SharedFileName := DatabaseFilePath; end else begin ShowMessage('Database file not found.'); Abort; end; end;
here is the error FShareSheet.SharedFileName is the undeclared identifier.
so the .sharedFileName is the issue.
i am looking in the FMX.MediaLibrary.Actions and can not see anything about the shared file name.
Thanks for any help.
-
Is there a way to longclick an item in a listbox ?
I need it for IOS and Android.
Thanks
-
Thank you Dave
-
I need to use the iOS scan text feature on my iPhone .
https://support.apple.com/guide/iphone/scan-text-and-documents-iph653f28965/ios
I am just wondering is there a way to access this and use it in my iOS app
thanks
-
Thanks for that info Patrick . I figured there was a good way to do that.
-
Is there a way to back up my keychain and certificates and my project on the MacBook ?
I am not familiar with a Mac just got one to compile Delphi apps
I use git on windows to back up the Delphi project code
just asking u guys to see if u have any tips or best practice for backing up the Mac with all the keychain ,certificates,ect
Thanks for any suggestions
-
Thanks for the input
i got one pushed up to testflight
i had some issues with my certificates
but it’s sorted now
-
Thanks Patrick
-
Hello all.
I am trying to learn how to deploy an app to testflight for testing.
I would like to use testflight to let my friends try my app.
I have been looking around google, youtube .
Can anyone share how to deploy an app to testflight from delphi.
Thanks for the advice.
-
thanks for that Serge
-
I been messing around with an fmx and SQLite app for a while all is good.
I was doing some fdquery work and all of the sudden when I put a check in active to do some visual design I got an error
That was the other day and I happen to just close out of Delphi.
I open the project back up messing around and compiling in windows and all is good.
iI try to compile to iOS and the app just tries to launch and immediately closes out
I try to compile to android and same thing.
if I uncheck the fdquery the app compiles fine on iOS and android.I look in deployment and the database files are there and the external dir paths look good
i deleted the files and add them back and same thing.
I did do a quick app with the same SQLite database and a simple query and it runs fine on android and iOS.
has anyone run into this with fdquery ?
I do not remember the error from the other day.
It seems to be something to do with the query or the SQLite database file.
any help to troubleshoot this is greatly appreciated.
by the way I closed delphi wen I got the error and did not save changes
so no wears error now when I tick the active box in the query
i do remember when I got the error from ticking the active box in the query I tried to compile and the compiler was stating it could not fin the fmx form. ( uMain )
sent from my iPhone
-
Thanks for all the help
-
Hey thanks for your time and help
That dia looks like a good tool
i will look at it tonight
-
I am thinking of writing a new database
table drinks
table ingredients
table directions
i think this will be better to use
it seems to be a problem to grab all the strIngredians1,stringrediants2 etc from the same table and show them in a memo -
There is 11 of the strIngrediants
-
It is a SQLite database
Example
Table (Drinks)
Fields
idDrink,strDirections,stringrediants1,stringrediants2,stringrediants3,stringrediants4,etc
so when I click on any record in the listview I need to use the idDrink (integer) and display all the fieldsidDrink field is int
strdrink is string
stringrediants1,stringrediants2,stringrediants3 is string
so the strDirections will go into a memothe stringrediants3,2,3 etc will go in a memo
Send basic email not working for me
in Indy
Posted · Edited by grantful
well on android in debug i got
constructor TIdSSLContext.Create;
begin
inherited Create;
//an exception here probably means that you are using the wrong version
//of the openssl libraries. refer to comments at the top of this file.
if not LoadOpenSSLLibrary then begin
raise EIdOSSLCouldNotLoadSSLLibrary.Create(RSOSSLCouldNotLoadSSLLibrary);
end;
fVerifyMode := [];
fMode := sslmUnassigned;
fSessionId := 1;
end;
I will have to check this out