[Pharo-project] Sending email with Pharo
Dear all, A DrGeo user asked me if it will be possible to share DrGeo sketch by Email. I guess he means, sending an email with an attached DrGeo file. My question is: - can we send email with Pharo? - if yes, can we attach file to such email? Any pointer, if any, appreciated Thanks Hilaire PS: if any of you have any idea how to share a file between different DrGeo instances running in different host, I will greatly appreciate your ideas/advices.
On Sep 15, 2012, at 8:57 AM, Hilaire Fernandes <hilaire.fernandes@edu.ge.ch> wrote:
Dear all,
A DrGeo user asked me if it will be possible to share DrGeo sketch by Email. I guess he means, sending an email with an attached DrGeo file.
My question is: - can we send email with Pharo? - if yes, can we attach file to such email?
Any pointer, if any, appreciated
I am using http://postmarkapp.com/ Very easy to set up, and they make sure that the mail does not get tagged as spam and so on. Thre is a ready to use library for Pharo: http://articles.tulipemoutarde.be/send-email-from-pharo-with-postmark Works great! We used it for the ESUG registration server this year. Marcus -- Marcus Denker -- http://marcusdenker.de
Thanks. It does not handle attachment right now as described by François. Is it a limitation of the Pharo Postmark library or the Pharo SMTP library? Thanks Hilaire Le 15/09/2012 09:42, Marcus Denker a écrit :
I am using http://postmarkapp.com/
Very easy to set up, and they make sure that the mail does not get tagged as spam and so on.
On Sep 15, 2012, at 10:11 AM, Hilaire Fernandes <hilaire.fernandes@edu.ge.ch> wrote:
Thanks. It does not handle attachment right now as described by François.
I thought is does? The last line is "edit: you can now attach files to your emails !"
Is it a limitation of the Pharo Postmark library or the Pharo SMTP library?
Postmark does not use SMTP. So the lib should be very easy to extend.
Thanks
Hilaire
Le 15/09/2012 09:42, Marcus Denker a écrit :
I am using http://postmarkapp.com/
Very easy to set up, and they make sure that the mail does not get tagged as spam and so on.
-- Marcus Denker -- http://marcusdenker.de
Le 15/09/2012 10:14, Marcus Denker a écrit :
I thought is does? The last line is "edit: you can now attach files to your emails !"
Oh, my fault, Fantastic. Appending the info in the drgeo bug ticket. https://bugs.launchpad.net/drgeo/+bug/1051168 Thanks Hilaire
Le 15/09/2012 09:42, Marcus Denker a écrit :
I am using http://postmarkapp.com/
Very easy to set up, and they make sure that the mail does not get tagged as spam and so on.
Thre is a ready to use library for Pharo:
http://articles.tulipemoutarde.be/send-email-from-pharo-with-postmark
Works great! We used it for the ESUG registration server this year.
Marcus
Hello Hilaire. Zodiac? I used zodiac to send email from contact forms in web sites made with Seaside, and works fine. Although sometimes they go to spam :/ See http://stackoverflow.com/questions/12293670/zodiac-mail-sending-in-pharo-sma... But, instead to use ZdcSecureSMTPClient class>>sendUsingGMailAccount:password:to:message: , I created a slightly modified version of that method, due to the smtp server I use the "from" field in mail message is different to "user" in smtp client. E.g. for "from" user1@mailserver.com the smtp "user" look like user1.mailserver. This is the method: ************************* sendServer: server port: port user: user password: password from: from to: to subject: subject body: body | smtpClient mailMessage | mailMessage := MailMessage empty. mailMessage setField: 'from' toString: from. mailMessage setField: 'to' toString: to. mailMessage setField: 'subject' toString: subject. mailMessage body: (MIMEDocument contentType: 'text/plain' content: body). (smtpClient := ZdcSecureSMTPClient new) user: user; password: password. smtpClient openOnHost: (NetNameResolver addressForName: server) port: port. ^ smtpClient mailFrom: from to: { to } text: mailMessage text; quit; close; yourself ******************************** Regards 2012/9/15 Hilaire Fernandes <hilaire.fernandes@edu.ge.ch>
Dear all,
A DrGeo user asked me if it will be possible to share DrGeo sketch by Email. I guess he means, sending an email with an attached DrGeo file.
My question is: - can we send email with Pharo? - if yes, can we attach file to such email?
Any pointer, if any, appreciated
Thanks
Hilaire
PS: if any of you have any idea how to share a file between different DrGeo instances running in different host, I will greatly appreciate your ideas/advices.
participants (3)
-
Gastón Dall' Oglio -
Hilaire Fernandes -
Marcus Denker