<p>Hi, how do one receive emails in Go? I am writing a web app that requires receiving and parsing of email, most libraries however seems to focus on sending email instead.</p>
<hr/>**评论:**<br/><br/>cfsalguero: <pre><p>This is a minimalistic smtpd and it is super easy to modify: Go-Guerrilla <a href="https://github.com/flashmob/go-guerrilla">https://github.com/flashmob/go-guerrilla</a></p></pre>HelloIm12AndWhatThis: <pre><p>Setup postfix and have it do Maildir delivery. Then you can parse the emails from the Maildir directory.</p></pre>egonelbre: <pre><p>Year ago while looking through SMTP server implementation the best I found was <a href="https://github.com/mhale/smtpd" rel="nofollow">https://github.com/mhale/smtpd</a>. Of course depending on what you need it to do, you may need to add protection against DoS, spam, FROM/REPLY-TO spoofing... and more... also fault tolerance by deploying to multiple servers.</p></pre>MistakenForYeti: <pre><p>I have a few Go apps that listen to inboxes and parse emails. I created eazye to get the work done and to simplify the lovely go-imap package: <a href="https://github.com/jprobinson/eazye" rel="nofollow">https://github.com/jprobinson/eazye</a></p></pre>i_regret_most_of_it: <pre><p>You write a mail server? It's not a small undertaking and I don't think there are any decent MTAs written in Go yet.</p>
<p>Better to just connect to an inbox where the mail is being sent (hosted on an actual mail server), and read the messages from there. There are decent IMAP client packages in Go, not sure if in stdlib but they exist.</p></pre>0x001D: <pre><p>+1 for the answer given by someone else here. you can use any stable an reliable SMTP server to receive emails and get the "receive" as you write wit a IMAP/POP library of your choice. I use <a href="https://github.com/mxk/go-imap">https://github.com/mxk/go-imap</a> for a project to get email from GMail and that works great so far.</p></pre>Bromlife: <pre><p>Email is an administrative nightmare at the best of times. Personally I rely on external services for mail management, which has saved me a lot of headaches. Currently I'm using <a href="http://mandrill.com/" rel="nofollow">Mandrill</a>.</p>
<p><a href="/u/i_regret_most_of_it" rel="nofollow">/u/i_regret_most_of_it</a> has the best suggestion if you're set on managing it all yourself. Postfix/Dovecot with <a href="https://github.com/mxk/go-imap" rel="nofollow">go-imap</a> is a great option.</p></pre>dgirard_: <pre><p><a href="https://cloud.google.com/appengine/docs/go/mail/#Go_Receiving_mail_in_Go" rel="nofollow">https://cloud.google.com/appengine/docs/go/mail/#Go_Receiving_mail_in_Go</a></p>
<p>-> need to use App Engine</p></pre>
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码`
- 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传