Page 1 of 1

SendMail connection reuse improvement

Posted: Mon Feb 13, 2023 5:27 am
by Rinzwind
Fred wrote: Sat Jan 28, 2023 5:26 pm Fixed. Also added the multiple send as long you don't call FreeMail() and uses the same address/credential
viewtopic.php?p=594694#p594694

It would be best if the PB library automatically matches a connection by username/server and reuses it when possible.

Alternatively, we need a SetMailTitle procedure to change the title so one Mail-'object' can be completely modified between multiple sends. A ResetMail command would be nice too in that case too to complete empty a mail. All so one can send multiple e-mails quickly without reauthenticating all the time.

Re: SendMail connection reuse improvement

Posted: Mon Feb 13, 2023 11:29 am
by Fred
We usually don't want to store password in a static map during all program run, so I don't think we will do it. You can do it easily with a map and storing the user:password as key, and mail id as value. For the SetMailTitle(), it's planned for the next version.

Re: SendMail connection reuse improvement

Posted: Mon Feb 13, 2023 12:18 pm
by Rinzwind
Good to hear & thanks again.

Re: SendMail connection reuse improvement

Posted: Fri Oct 06, 2023 1:05 pm
by Fred
SetMailTitle() is already available using the Subject attribute: https://www.purebasic.com/documentation ... ibute.html, or I miss something ?