jens-maus / yam

:mailbox_with_mail: YAM (short for 'Yet Another Mailer') is a MIME-compliant open-source Internet email client written for Amiga-based computer systems (AmigaOS4, AmigaOS3, MorphOS, AROS). It supports POP3, SMTP, TLSv1/SSLv3 connection security, multiple users, multiple identities, PGPv2/v5 encryption, unlimited hierarchical folders, an ARexx interface, etc...
https://yam.ch
GNU General Public License v2.0
61 stars 18 forks source link

YAM arexx port problems #641

Closed JosDuchIt closed 7 years ago

JosDuchIt commented 7 years ago

I noted the commands MailInfo & GetMailInfo don't work correctly any more. I used to have a working script using MailInfo, didn't use GetMailinfo as it provides less info The script below should make the problems obvious.

/* _GetMailInfo.yam - YAM/Gui4CLI interface */

OPTIONS RESULTS ADDRESS YAM 'MailRead QUIET' /* no effect */ 'GetMailinfo var' mm ' active' say mm 'GetMailinfo var' mm ' status' say mm 'GetMailinfo var' mm ' from' say mm 'GetMailinfo var' mm ' to' say mm 'GetMailinfo var' mm ' replyto' say mm 'GetMailinfo var' mm ' subject' say mm 'GetMailinfo var' mm ' file' say mm say "-----------" 'GetMailinfo var' mm 'item active' say mm 'GetMailinfo var' mm 'item status' say mm 'GetMailinfo var' mm 'item from' say mm 'GetMailinfo var' mm 'item to' say mm 'GetMailinfo var' mm 'item replyto' say mm 'GetMailinfo var' mm 'item subject' say mm 'GetMailinfo var' mm 'item file' say mm

'GetMailinfo STEM' mi.

say mi.active say mi.status say mi.from say mi.to say mi.replyto say mi.subject say mi.file

'Mailinfo STEM' mi. say mi.index say mi.status say mi.from say mi.to say mi.replyto say mi.cc say mi.bcc say mi.resentto say mi.subject say mi.filename say mi.size say mi.date say mi.flags say mi.msgid say "---------" 'MailInfo VAR' mm say mm 'ReadClose' /* no effect */

tboeckel commented 7 years ago

I cannot really tell whether the "VAR" variant was ever supposed to be working. All ARexx script examples I have seen so far use the "STEM" variant. And from my point of view that variant is working. Of course not all fields can be filled, i.e. if there is not CC recipient.

It might have been a good idea to state exactly what you were expecting and what is not working as expected. Without such information all we can do is guessing...

JosDuchIt commented 7 years ago

Hello Thore

Please note I got an Odyssey guru trying to upload this in the debug tracker.

I did my best providing a script and its results showing what works and what does not work.

I was not able though to add the results of running the script to the new debug tracking interface and seem to not have saved them. (if you are not carefull & chose to drag & drop an attachment, you don't get a second chance to add that attachment, so i had to copy paste the script, & submitted it, noting afterwards i could not edit it or attach results to it)

I guessed that the results would be obvious and make clear that there wer bugs both in GetMailinfo & MailInfo (& both with STEM) From running the script again i can conclude 1) Getmailinfo does not provide the output described in the arexx APi, it seems to only give the index of the current message whatever infor you ask 2) Mailinfo STEM works correctly So why did i add a test? Mailinfo seemed not to work too for the info items FROM TO REPLYTO & MSGID but this was with an other script see http://www.amigans.net/modules/xforum/viewtopic.php?topic_id=7351&forum=3- I was convinced i had seen the same results with the script i did send you, but i may have been mistaken. I can definitely confirm however the results of the provided link I cleaned up that script as suggested in that thread and you'll find it in attachment. It does provide the same results 15.Stock:Internet/YAM_2.10/Rexx> Rx "MessageInfo.yam" SetEnv: unable to open redirection file 12 - 'SetEnv .YmMsg.Frm' mi.from; +++ Command returned 10 SetEnv: unable to open redirection file 14 - 'SetEnv .YmMsg.RTo' mi.replyto; +++ Command returned 10 SetEnv: unable to open redirection file 23 -_ 'SetEnv .YmMsg.MId' mi.msgid; +++ Command returned 10

Now what is strange is that eg DATE can be accessed this way but FROM, TO & MSGID can't.

This is an old script used in a GUI (written in Gui4Cli) manipulating YAM in different ways that used to work well with YAM2.4, But i forgot about it and didn't use or touch it with later YAM versions

I intended to improve it permitting to clean up folders from messages older than a preset nr of days.

So if my script is correct arexx, there is something subtle that changed in the arexx interface between 2.4 & 2.10. At least that's my explanation of the results

Thanks for help

Joseph

On 09/22/2016, you wrote:

I cannot really tell whether the "VAR" variant was ever supposed to be working. All ARexx script examples I have seen so far use the "STEM" variant. And from my point of view that variant is working. Of course not all fields can be filled, i.e. if there is not CC recipient.

It might have been a good idea to state exactly what you were expecting and what is not working as expected. Without such information all we can do is guessing...

Regards

/* _MessageInfo.yam - YAM/Gui4CLI interface */

OPTIONS RESULTS ADDRESS YAM 'MailRead QUIET' /* no effect / 'Mailinfo STEM' mi. 'ReadClose' / no effect */ ADDRESS COMMAND 'SetEnv .YmMsg.Idx' mi.index 'SetEnv .YmMsg.Sts' mi.status 'SetEnv .YmMsg.Frm' mi.from 'SetEnv .YmMsg.To' mi.to 'SetEnv .YmMsg.RTo' mi.replyto 'SetEnv .YmMsg.CC' mi.cc 'SetEnv .YmMsg.BCC' mi.bcc 'SetEnv .YmMsg.RstTo' mi.resentto 'SetEnv .YmMsg.Sbj' mi.subject 'SetEnv .YmMsg.Nme' mi.filename 'SetEnv .YmMsg.Sze' mi.size 'SetEnv .YmMsg.Dte' mi.date 'SetEnv .YmMsg.Flg' mi.flags 'SetEnv .YmMsg.MId' mi.msgid

JosDuchIt commented 7 years ago

I detected the source of the errors was with the script, when an info contained sharp brackets (as in .from .to, .cc .bcc) these were interpreted as DOS redirection instructions. Sorry for your time. I guess the ticket van be closed