<commit_before>require 'sinatra'

get '/' do
  erb :index
end

post '/mail' do
  require 'pony'

  name = params["fullName"]
  email = params["email"]
  phone = params["phone"]
  subject = name + " has contacted you about ZegTel"
  body = params["message"]
  puts name + " hello world"
  Pony.mail(
  # unless params[:name] == '' || params[:email] == '' || params[:content] == ''
    :from => '<EMAIL>',
    :subject => subject,
    :body => body + email,
    :to => "<EMAIL>",
    :via => :smtp,
    :via_options => {
      :address => 'smtp.sendgrid.net',
      :port => '587',
      :domain => 'heroku.com',
      :user_name => ENV['SENDGRID_USERNAME'],
      :password => ENV['<PASSWORD>'],
      :authentication => :plain,
      :enable_starttls_auto => true
  }
)
end<commit_msg>spoke too soon.. fixed the ajax data and put the params into Pony mail<commit_after>require 'sinatra'

get '/' do
  erb :index
end

post '/mail' do
  require 'pony'

  name = params["fullName"]
  email = params["email"]
  phone = params["phone"]
  subject = name + " has contacted you about ZegTel"
  body = params["message"]
  puts name + " hello world"
  Pony.mail(
  # unless params[:name] == '' || params[:email] == '' || params[:content] == ''
    :from => '<EMAIL>',
    :subject => subject,
    :body => body + "\n" + "email : #{email} \n phone: #{phone}",
    :to => "<EMAIL>",
    :via => :smtp,
    :via_options => {
      :address => 'smtp.sendgrid.net',
      :port => '587',
      :domain => 'heroku.com',
      :user_name => ENV['SENDGRID_USERNAME'],
      :password => ENV['<PASSWORD>'],
      :authentication => :plain,
      :enable_starttls_auto => true
  }
)
end
{'fraction_non_alphanumeric': 0.19267707082833133, 'fraction_numerical': 0.003601440576230492, 'mean_word_length': 3.016867469879518, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '383712', 'n_tokens_mistral': 589, 'n_tokens_neox': 577, 'n_words': 143}