• SwithMail

    From =?UTF-8?B?zpPOtc+Jz4HOs865zr/PgiDOp@21:1/5 to All on Wed Jun 7 13:22:30 2023
    Hi all,

    Does anyone have expirience with SwithMail . I would really appreciate if someone have a sample.

    Thanks all
    George

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ferenc Ferenc@21:1/5 to All on Fri Jun 9 03:40:16 2023
    Hi George,

    I use SwithMail with satisfaction.
    The website https://www.tbare.com/software/swithmail/ has detailed instructions on how to use it.
    My copy of the program:

    If File(cXml)
    cParam:=' /s /x "SwithMailSettings_'+MyTrim(oSrv:FIELDGET(#Id),"0")+'.xml"'
    lOk :=RunPrg(self,cExe,cParam,Filepath2(cExe),nSw) == 0 //

    if !lOk //Ha nem sikerül az email küldés
    // WB(, cError2)
    Fajlbair(oSrv:FIELDGET(#Mail_Settings_XML),"EmailLog.txt")
    ShellExecute(null,String2Psz("open"),String2Psz("EmailLog.txt"),null,null,SW_SHOWNORMAL)

    else
    //WB("Ok!")
    oSrv:FIELDPUT(#Sent_To,true)
    oSrv:FIELDPUT(#Send_Date,GetTimeStamp())
    oSrv:Commit()
    nElkuldve+=1

    endif
    endif

    function RunPrg(oWin as object,cEXEfile as string,cParameters:="" as string, cWorkDir as string, nShow:=SW_NORMAL as word) as dword //EXE Run

    local SEInfo as _WinShellExecuteInfo
    local hProc as ptr
    local lpExitCode := 999 as dword
    local lRunning as logic
    local lSuccess as logic

    if oWin <> null_object
    oWin:Pointer := Pointer{ POINTERHOURGLASS }
    endif

    SEInfo := MemAlloc(_sizeof(_winSHELLEXECUTEINFO))
    SEInfo.cbSize := _sizeof(_winSHELLEXECUTEINFO)
    SEInfo.fMask := SEE_MASK_NOCLOSEPROCESS + SEE_MASK_FLAG_NO_UI
    SEInfo.lpVerb := psz(_cast, "open")
    SEInfo.lpFile := psz(_cast, cExeFile )
    SEInfo.lpParameters := psz(_cast, cParameters )
    SEInfo.lpDirectory := String2Psz(cWorkDir)
    SEInfo.nShow := nShow//SW_NORMAL, SW_HIDE
    SEInfo.hInstApp := null_ptr
    SEInfo.lpClass := null_psz

    if ShellExecuteEx(SEInfo) // File executed correctly
    hProc := SEInfo.hProcess

    GetExitCodeProcess( hProc, @lpExitCode )
    lRunning := ( lpExitCode = STILL_ACTIVE )

    do while lRunning // Wait until finishes
    GetExitCodeProcess( hProc, @lpExitCode )
    lRunning := ( lpExitCode = STILL_ACTIVE )
    YML()
    enddo
    lSuccess := true

    CloseHandle(SEInfo.hProcess)

    MemFree(SEInfo) // File was executed and the execution finished
    else
    // An error occured (use GetLastError() to see what happened)
    MemFree(SEInfo)
    endif
    if oWin <> null_object
    oWin:Pointer := Pointer{ POINTERARROW }
    endif


    return lpExitCode


    Kind Regards,
    Szepligeti Ferenc

    Γεωργιος Τριτσος ezt írta (2023. június 7., szerda, 22:22:31 UTC+2):
    Hi all,

    Does anyone have expirience with SwithMail . I would really appreciate if someone have a sample.

    Thanks all
    George

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?B?zpPOtc+Jz4HOs865zr/PgiDOp@21:1/5 to All on Fri Jun 9 12:05:12 2023
    Στις Παρασκευή 9 Ιουνίου 2023 στις 1:40:17 μ.μ. UTC+3, ο χρήστης Ferenc Ferenc έγραψε:
    Hi George,

    I use SwithMail with satisfaction.
    The website https://www.tbare.com/software/swithmail/ has detailed instructions on how to use it.
    My copy of the program:

    If File(cXml)
    cParam:=' /s /x "SwithMailSettings_'+MyTrim(oSrv:FIELDGET(#Id),"0")+'.xml"' lOk :=RunPrg(self,cExe,cParam,Filepath2(cExe),nSw) == 0 //

    if !lOk //Ha nem sikerül az email küldés
    // WB(, cError2)
    Fajlbair(oSrv:FIELDGET(#Mail_Settings_XML),"EmailLog.txt") ShellExecute(null,String2Psz("open"),String2Psz("EmailLog.txt"),null,null,SW_SHOWNORMAL)

    else
    //WB("Ok!")
    oSrv:FIELDPUT(#Sent_To,true)
    oSrv:FIELDPUT(#Send_Date,GetTimeStamp())
    oSrv:Commit()
    nElkuldve+=1

    endif
    endif

    function RunPrg(oWin as object,cEXEfile as string,cParameters:="" as string, cWorkDir as string, nShow:=SW_NORMAL as word) as dword //EXE Run

    local SEInfo as _WinShellExecuteInfo
    local hProc as ptr
    local lpExitCode := 999 as dword
    local lRunning as logic
    local lSuccess as logic

    if oWin <> null_object
    oWin:Pointer := Pointer{ POINTERHOURGLASS }
    endif

    SEInfo := MemAlloc(_sizeof(_winSHELLEXECUTEINFO))
    SEInfo.cbSize := _sizeof(_winSHELLEXECUTEINFO)
    SEInfo.fMask := SEE_MASK_NOCLOSEPROCESS + SEE_MASK_FLAG_NO_UI
    SEInfo.lpVerb := psz(_cast, "open")
    SEInfo.lpFile := psz(_cast, cExeFile )
    SEInfo.lpParameters := psz(_cast, cParameters )
    SEInfo.lpDirectory := String2Psz(cWorkDir)
    SEInfo.nShow := nShow//SW_NORMAL, SW_HIDE
    SEInfo.hInstApp := null_ptr
    SEInfo.lpClass := null_psz

    if ShellExecuteEx(SEInfo) // File executed correctly
    hProc := SEInfo.hProcess

    GetExitCodeProcess( hProc, @lpExitCode )
    lRunning := ( lpExitCode = STILL_ACTIVE )

    do while lRunning // Wait until finishes
    GetExitCodeProcess( hProc, @lpExitCode )
    lRunning := ( lpExitCode = STILL_ACTIVE )
    YML()
    enddo
    lSuccess := true

    CloseHandle(SEInfo.hProcess)

    MemFree(SEInfo) // File was executed and the execution finished
    else
    // An error occured (use GetLastError() to see what happened) MemFree(SEInfo)
    endif
    if oWin <> null_object
    oWin:Pointer := Pointer{ POINTERARROW }
    endif


    return lpExitCode


    Kind Regards,
    Szepligeti Ferenc
    Γεωργιος Τριτσος ezt írta (2023. június 7., szerda, 22:22:31 UTC+2):
    Hi all,

    Does anyone have expirience with SwithMail . I would really appreciate if someone have a sample.

    Thanks all
    George
    Hi Ferenc,

    Thanks a lot for your sample. I will try it.

    Regards
    George

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From James Martin@21:1/5 to All on Mon Jun 12 08:59:47 2023
    I used it when I needed it, and would again if needed. It worked well.
    It will take some time to get a sample together, but try to asap.

    James

    On 6/7/23 16:22, Γεωργιος Τριτσος wrote:
    Hi all,

    Does anyone have expirience with SwithMail . I would really appreciate if someone have a sample.

    Thanks all
    George

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?B?zpPOtc+Jz4HOs865zr/PgiDOp@21:1/5 to All on Wed Jun 14 11:47:09 2023
    Στις Δευτέρα 12 Ιουνίου 2023 στις 3:59:50 μ.μ. UTC+3, ο χρήστης James Martin έγραψε:
    I used it when I needed it, and would again if needed. It worked well.
    It will take some time to get a sample together, but try to asap.

    James
    On 6/7/23 16:22, Γεωργιος Τριτσος wrote:
    Hi all,

    Does anyone have expirience with SwithMail . I would really appreciate if someone have a sample.

    Thanks all
    George
    Hi,
    I tried but i took error "5.7.0. authentication required" in server gmail and i took error "net_io_connectionclosed" for yahoo.
    I am trying to find what's going wrong.
    Any ideas would be helpfull.

    Regards
    George

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ferenc Ferenc@21:1/5 to All on Thu Jun 15 00:56:27 2023
    Hi,
    Yes, there seems to have been a change in authentication since I tested it.
    I tested again, it works again. The password should not be replaced by the gmail password, but by the generated application password after setting up two-step authentication.
    You can find detailed instructions here:

    https://support.google.com/mail/thread/146949535/the-server-response-was-5-7-0-authentication-required?hl=en

    https://support.google.com/accounts/answer/185833?hl=en&sjid=14800053331033760336-EU

    Regards
    Ferenc

    Γεωργιος Τριτσος ezt írta (2023. június 14., szerda, 20:47:10 UTC+2):
    Στις Δευτέρα 12 Ιουνίου 2023 στις 3:59:50 μ.μ. UTC+3, ο χρήστης James Martin έγραψε:
    I used it when I needed it, and would again if needed. It worked well.
    It will take some time to get a sample together, but try to asap.

    James
    On 6/7/23 16:22, Γεωργιος Τριτσος wrote:
    Hi all,

    Does anyone have expirience with SwithMail . I would really appreciate if someone have a sample.

    Thanks all
    George
    Hi,
    I tried but i took error "5.7.0. authentication required" in server gmail and i took error "net_io_connectionclosed" for yahoo.
    I am trying to find what's going wrong.
    Any ideas would be helpfull.

    Regards
    George

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)