Arc Forumnew | comments | leaders | submitlogin
Sending email from Arc.
3 points by markkat 4937 days ago | 3 comments
I'm trying to figure it out. I've seen aw's gmail http://awwx.ws/sendgmail via PERL, but I am wondering if anyone else is using their own server.

I've got Postfix/Dovecot/MySQL running, but would be happy to change if a path has been made elsewhere. -At the bleeding edge of my current skillset.



4 points by akkartik 4936 days ago | link

I just use system to call sendmail (postfix). Here's how it looks in readwarp.

  (mac pipe-to(dest . body)
    `(fromstring
       (tostring ,@body)
       ,dest))

  (def mail(to subject message)
    (pipe-to (system "sendmail -t")
      (prn "To: " to)
      (prn "Subject: " subject)
      (prn) 
      (prn message)))
You may need more options for the sendmail command. I use authsmtp to stay out of people's spam folders, and that requires some changes.

-----

3 points by aw 4935 days ago | link

Added to the wiki: https://sites.google.com/site/arclanguagewiki/faq

-----

2 points by markkat 4936 days ago | link

Thanks akkartik this should get me started. Much appreciated.

EDIT: Awesome I think I've got it. Thanks again!

-----