cURL with $runapplescript

Das Goravani das at Goravani.com
Fri Jan 26 11:47:24 EST 2018


Michael, I don’t have help for you, I want to leach this code for the same purpose, sending email
Do you know how to add an attachment to it, could you show that, know I’m asking a lot, sorry
Is CURL something I need or something I already have, I’m on a Mac, latest OS

> On Jan 26, 2018, at 8:09 AM, Michael Mantkowski <michaelj at clientrax.com> wrote:
> 
> We are using the code below to run cURL on the Mac to send a email.  It
> works fine when all your input is correct.  But if you have a incorrect
> password for instance, then the "Result" field is returned and empty and the
> lvError is 1753.
> 
> Does anyone know how to make it return the status information from cURL even
> if the command is not successful?  I want to use that to help the user know
> what is wrong.
> 
> 
> Begin text block
> Text: curl -s -S --verbose --url
> 'smtp[pick(pSecure,'','s','')]://[pHostName]' --ssl (Carriage return)
> Text: --mail-from '[pSenderEmail]' (Carriage return)
> Text: --mail-rcpt '[pRecipientEmail]' (Carriage return)
> Text: --upload-file [MessageFilePathPOSIX] (Carriage return)
> Text: --user '[pUserName]:[pPassword]' (Carriage return)
> Text: 2>&1     ;; Outputs STDERR to STDOUT.  Verbose uses STDERR.
> Applescipt returns STDOUT
> End text block
> Get text block Command
> Do replaceall(Command,kCr,kSp) Returns Command     ;; Replace carriage
> returns with spaces to correct the formatting of the command.  Text blocks
> in omnis dont allow leading or trailing spaces
> 
> Calculate AppleScript as con("do shell script ",kDq,Command,kDq)
> Do $runapplescript(AppleScript,Result) Returns lvError
> Calculate pTranscriptOut as Result
> 
> 
> *********************************************************************
> Michael Mantkowski
> ClienTrax Software
> 1-614-875-2245
> *********************************************************************
> 
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com
> 




More information about the omnisdev-en mailing list