If you don’t want to invest in Sites or Communities, then an email service seems like the best option. You can just have your website send a formatted email to an email service you create in SF. You first need to write an Apex class to handle the inbound email. I have used the following email format and Apex Class which is a modified version of an Email service you write in DEV501.
I use the following format for the email from your website
[STARTBODY]firstname=John:lastname=Doe:phone=5555555555:field=value[ENDBODY]
Write an apex class that implements Messaging.InboundEmailHandler
Here’s a basic example of the email handler that you can likely modify
global class MyEmailHandler implements Messaging.InboundEmailHandler {
global Messaging.InboundEmailResult handleInboundEmail(Messaging.InboundEmail email, Messaging.InboundEnvelope envelope) {
Messaging.InboundEmailResult result = new Messaging.InboundEmailresult();
try{
String theBody;
List<String> fieldList = new List<String>();
if (email.plainTextBody != null){
theBody = email.plainTextBody;
} else {
theBody = email.htmlBody;
}
theBody = theBody.substring(theBody.indexOf('[STARTBODY]')+11,theBody.indexOf('[ENDBODY]'));
fieldList = theBody.split(':',0);
Map<String,String> fieldMap = new Map<String,String>();
for(String field : fieldList){
if (field.split('=',0).size() == 2){
fieldMap.put(field.split('=',0)[0],field.split('=',0)[1]);
}
}
Contact con;
try{
con = [select id,FirstName, LastName From Contact where LastName =:fieldMap.get('lastname')];
} catch (QueryException qe){
if (con == null){
con = new Contact();
}
}
// update or insert the field values that came in the email
con.FirstName = fieldMap.containsKey('firstname') ? EncodingUtil.urlDecode(fieldMap.get('firstname'),'UTF-8') : null;
con.LastName = fieldMap.containsKey('lastname') ? EncodingUtil.urlDecode(fieldMap.get('lastname'),'UTF-8') : null;
//Any other fields you use in your email from the site
try{
if (con.id == null) {
insert con;
} else {
update con;
}
} catch (DMLException e){
result.success = false;
return result;
}
} catch (Exception e){
result.success = false;
return result;
}
return result;
}
}
Then you just need to create a new email service that uses this new Apex class. You can do that by going to Setup -> Develop -> Email Services -> New
Hope this helps