[racket-users] Re: Examples of sending HTML email w/ Racket?

2021-08-01 Thread br...@lojic.com
The axio-env.rkt file is part of the ToDo app I created for RacketCon. You 
can see the entire ToDo app here:

https://github.com/lojic/RacketCon2020/tree/master/TodoApp

In particular, axio-env.rkt is meant to live outside of source control 
because it has secrets. An example file, that would need to be renamed to 
axio-env.rkt is here:

https://github.com/lojic/RacketCon2020/blob/master/TodoApp/axio/example-axio-env.rkt

An example of sending an email can be found in the comment controller here:

https://github.com/lojic/RacketCon2020/blob/master/TodoApp/controllers/comment.rkt

Hope this helps a little.

Brian

On Saturday, July 31, 2021 at 12:41:33 PM UTC-4 write...@gmail.com wrote:

> (require "./axio-env.rkt") 
>
> is this part of emailing program? as i am unable to install axio env 
>
> raco pkg install g...@github.com:AxioFramework/axio.git
> raco pkg install: invalid package source;
> inferred package name includes disallowed characters
> given: g...@github.com:AxioFramework/axio.git
> mark@ll~ $ raco pkg install https://github.com:AxioFramework/axio.git
> raco pkg install: invalid package source;
> cannot parse URL
> given: https://github.com:AxioFramework/axio.git
> don't seem to work ; kindly help #noob
>
>
>
>
> On Wednesday, April 8, 2020 at 9:54:48 AM UTC-7 br...@lojic.com wrote:
>
>> I was able to write a simple wrapper around smtp-send-message and get it 
>> working through SendGrid in a few minutes (see below), but I wasn't able to 
>> find any examples of sending emails containing both a plain text version 
>> and HTML version. Can anyone point me to some examples?
>>
>> Thanks,
>> Brian Adkins
>>
>>
>> #lang racket/base
>>
>> (require net/head
>>  net/smtp
>>  openssl
>>  racket/contract)
>> (require "./axio-env.rkt")
>>
>> ;; (module+ main
>> ;;   (send-email "Fred Flintstone "
>> ;;   '("Barney Rubble ")
>> ;;   "Test message subject"
>> ;;   (list
>> ;;"Message line one"
>> ;;"line two"
>> ;;""
>> ;;"line four")))
>> (define/contract (send-email from to subject message-lines)
>>   (-> string? (listof string?) string? (listof (or/c string? bytes?)) any)
>>   (smtp-send-message smtp-server
>>  from
>>  to
>>  (standard-message-header from to '() '() subject)
>>  message-lines
>>  #:port-no smtp-port
>>  #:auth-user   smtp-username
>>  #:auth-passwd smtp-password
>>  #:tls-encode  ports->ssl-ports))
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/78b59360-6204-484e-8912-4a21b031fb26n%40googlegroups.com.


[racket-users] Re: I‘m new to racket, i want to know the best resources of learning racket

2020-12-29 Thread br...@lojic.com
If you like learning by example, I have a github repo w/ many examples:

https://github.com/lojic/LearningRacket

On Thursday, December 3, 2020 at 5:19:43 AM UTC-5 cy691...@gmail.com wrote:

> Any suggestions? Thanx for you guys

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/e93e6ed0-27b4-4112-9e7e-6ebceb96e37an%40googlegroups.com.


[racket-users] Re: Dynamic-place PR

2020-12-29 Thread br...@lojic.com
Maybe ask on https://groups.google.com/g/racket-dev ?

On Wednesday, December 9, 2020 at 10:41:51 AM UTC-5 na...@manicmind.earth 
wrote:

> Hello.
>
> Is the PR #3518 “Create `racket/place/dynamic` to reduce dependencies.” 
> going to happen?
>
> I was trying to use ‘#%place and its `dynamic-place` but realized i have 
> to do some management of streams, i think.
>
> Nate

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/70c39af4-0da0-4ad3-9802-5c557edecfb6n%40googlegroups.com.


[racket-users] Re: Executing (system ...) command requires another 'ENTER' from repl?

2020-12-29 Thread br...@lojic.com
The documentation for (system) states:

"The resulting process writes to (current-output-port), reads from 
(current-input-port), and logs errors to (current-error-port)."

So, I'm guessing that it may be waiting for input. The following does not 
require an extra enter key:

(parameterize ([current-input-port (open-input-string "")])
  (with-output-to-string (lambda () (system "ls"

Also, DrRacket doesn't require an extra enter key, so maybe there is 
something going on unique to the command line REPL.

On Sunday, December 13, 2020 at 5:19:56 PM UTC-5 mlist...@gmail.com wrote:

> Hi,
>
> I wonder why I need to press ENTER *twice *in the racket REPL for this 
> command:
>
> racket
> Welcome to Racket v7.9 [bc].
> > (with-output-to-string (lambda () (system "ls")))
>
> "a.rkt\nfuncs.rkt\nliteral.rkt\nparser.rkt\nparser-test.rkt\nt.rkt\ntuvalu.rkt\n"
>
> >
>
> It executes normally if I run this in a Racket  script as below:
>
> #lang racket
> (with-output-to-string (lambda () (system "ls")))
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/87990541-c13d-4aa9-add3-b695375e9a86n%40googlegroups.com.


[racket-users] Re: Permutations ind Racket

2020-12-29 Thread br...@lojic.com
Kira:

You mentioned things (map, foldr, ...) that you're not permitted to use, 
but I don't know the full homework requirements. If your professor did not 
preclude the built-in permutations function, you could use that as a way of 
teaching your professor to communicate the requirements more clearly - they 
love that sort of thing ;)

https://docs.racket-lang.org/reference/pairs.html?q=permutations#%28def._%28%28lib._racket%2Flist..rkt%29._permutations%29%29

Brian

On Tuesday, December 15, 2020 at 8:12:25 AM UTC-5 kiel@gmail.com wrote:

> I study programming and have to do permutations in Racket without 
> something like map , foldr, remove, remq, sort! or begin. So now i have a 
> code but it doesn't show me every Permutation and some dopple. I can't find 
> the issue or how to fix and program it right only using recursion. Maybe 
> some of you know how to help me and find my logical or programming issue.  
> Here you can find a github link to my code.
> https://gist.github.com/KiraBen/fd70ea1063dfcdadfea0332343e37558
>
> Thank you for your help. 
>
> With greetings Kira Bender
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/d65c721c-bc2a-46dd-ba89-bc19ec84ee1en%40googlegroups.com.