Use Go to collect emails

polaris · · 429 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>For a small project I was working on, I wanted to create a simple landing page that has a box for the user to enter and submit their email. </p> <p>Any recommendations on this? Is it worth doing in Go?</p> <hr/>**评论:**<br/><br/>hansdr: <pre><p>It depends on what you&#39;re planning to do with the email address. If you plan to send a newsletter, or a sequence of emails (e.g., maybe they&#39;re signing up for a mini email course), then the easiest option is to use a service like MailChimp, AWeber, GetResponse, etc. Those services have simple forms that you can embed in a webpage for email signups.</p> <p>If you&#39;re planning on doing something else with the email address (or just want to learn how its done), then it would be worth doing in Go. The basics are: - Create a form in the landing page - Create a POST handler that reads the form, checks it for errors, duplicate emails, SQL injection attempts, etc., and then stores the email into a database</p> <p>I don&#39;t have a complete example, but here&#39;s a page showing how to build a form and validate an email address in Go: <a href="http://www.alexedwards.net/blog/form-validation-and-processing" rel="nofollow">http://www.alexedwards.net/blog/form-validation-and-processing</a></p></pre>gogolang: <pre><p>I&#39;d also recommend checking out <a href="https://www.bitballoon.com/" rel="nofollow">https://www.bitballoon.com/</a> You basically create HTML/JS/CSS and bitballoon will capture all the input from the form and database it.</p> <p>You can then link it up to Zapier and connect it up to various other services without having to write any code. <a href="https://www.bitballoon.com/docs/zapier/" rel="nofollow">https://www.bitballoon.com/docs/zapier/</a></p></pre>

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

429 次点击  
加入收藏 微博
0 回复
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传