I use msmtp for my needs.
(define (send-email)
(let ((port (open-pipe* OPEN_BOTH "msmtp" SMTP_MAIL_TO_SECRETARY)))
(display (smtp-body) port)
(close-pipe port)))
Works great.
Konrad
Is there any solution to convert charset from one encoding to another?
I have database in iso-8859-2 but my script runs in utf-8. I use dbi module.
--
Konrad
Konrad Makowski writes:
> Is there any solution to convert charset from one encoding to another?
Yes, but character encodings are only relevant when converting between a
sequence of _bytes_ (a bytevector), and a sequence of _characters_ [*]
(a string). These conversions happen implicitly while p
Konrad Makowski writes:
> I use msmtp for my needs.
>
> (define (send-email)
> (let ((port (open-pipe* OPEN_BOTH "msmtp" SMTP_MAIL_TO_SECRETARY)))
> (display (smtp-body) port)
> (close-pipe port)))
You should use OPEN_WRITE instead of OPEN_BOTH here, but otherwise it
looks good to me.
M
Mark H Weaver writes:
> It would be good if someone with more knowledge of databases would chime
> in here.
I'm pretty fuzzy on the details, but postgresql can handle the concept
of varying encodings and converting on the fly, so that you can tell a
session that you want a particular encoding.