Skip to content

Instantly share code, notes, and snippets.

@anabelle
Created January 21, 2012 21:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anabelle/1654047 to your computer and use it in GitHub Desktop.
Save anabelle/1654047 to your computer and use it in GitHub Desktop.
def receive_email
@params = params
#make sure request is a post
text = params["text"]
html = params["html"]
to = params["to"]
from = params["from"]
subject = params["subject"]
attachment1 = params["attachment1"]
lead_string = attachment1.read
email_leads = lead_string.scan(/\d.*/)[0].to_i
phone_leads = lead_string.scan(/\d.*/)[1].to_i
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment