You are not logged in.
Pages: 1
Function TSMTPConnection.FromText() should be changed as follows:
// if Split(aText, '@', u, h) then
// begin
// if not Split(u, ':', User, Pass) then
// User := u;
// end
// else
// h := aText;
h := SplitRight(aText, '@', @u);
if u <> '' then
begin
if not Split(u, ':', User, Pass) then
User := u;
end;
With this, the following tests work:
// user='guest@user', pass='123@456', host='mail.test.com', port='25'
var
con: TSMTPConnection;
begin
con.FromText('mail.test.com');
con.FromText('mail.test.com:25');
con.FromText('guest@user@mail.test.com:25');
con.FromText('guest@user:123@456@mail.test.com);
con.FromText('guest@user:123@456@mail.test.com:25');
With best regards
Thomas
Offline
Nice catch!
Please check https://github.com/synopse/mORMot2/commit/938b8c62
Thanks a lot for the feedback and the fix!
Offline
Pages: 1