How can i add email support with asp.net mvc application? - asp.net

I am working on one asp.net mvc project. In which I want the facility of customer feedback. Suppose I have sent email for getting feedback on our services. So we are sending emails to customers. They gives answer via Reply of that email. And we want to save that reply automatically in database tables. Its sure that we will receive email on one our fixed email address.
So basically i want to store the reply of email from customers into the database with that customer email id. please note here Customers reply email id will be the unique customer field for me.
Is this possible? How can i achieve such functionality? Please suggest me.
Thanks in advance.

Saving email replies has nothing to do with asp.net mvc per se.
having said that, here are some solutions that you can evaluate:
assuming all the replies go to a designated mailbox (Exchange or whatever), you can setup filters (e.g. VBA files in Exchange) which can intercept the incoming emails, parse them and save it to the data base.
if you don't want to mess with mail server native filters, you can write an offline utility (C# console app, windows service, powershell script etc.) which can query a Mailbox and parse the emails and save it to the database.
All of the above approaches have their pros/cons based on ease of installation, logging, maintainability etc.
p.s. please discard the below if it doesn't make any sense for you.
an uber advice i have always received for customer feedback design problems is to get as much objective data as possible. (as opposed to unstructured textual content in an email) and to get objective data,
one option is to have a feedback form on the website where users fill in definitive fields and you can save the information in a very structured and objective manner.
another option is to send them an email with a link to the feedback form on the site, so that if not immediately, they can leisurely come back to the same site and you collect objective data the same way.
saves you the trouble of parsing emails, trying to save email documents, parsing html/string contents, manual intervention to interpret sentiments of the email etc.

Related

Front-End Mail Client on wordpress?Possible?

I have a wish to somehow create on front-end a page with webmail client, to access up to 20+ email accounts, also send/recieve emails, etc. Like Thunderbird, or any other email client but on web. I didn't found any plugin for this purpose and maybe you have some ideas how to do that? Thanks!
this might be extremely hard if you wish to build from scratch. My best guess is that you need to find an open-source email client and integrate it within the WP framework. But that also will be hard to do, finding an open-source email client will save a ton and tons of time to build a strong email client but you're going to have to customize its structure to make compatible with WordPress environment, like database calls, authentication and more.
Still, you can always build a simple email client that checks the client email server grab his emails, and send an email if they want to, this is possible using the POP, SMTP PHP functionalities that allows you to talk to the email server.
Thanks

How to send an anonymous email through Wordpress?

I have a client who has a crimestoppers' website. They want to provide visitors a means to submit anonymous crime tips, which would then be forwarded to a pre-established email address at the local police department.
What is the best / easiest way to accomplish this? The sender's IP address needs to be hidden. My client also needs to be able to pull reports showing how many tips were submitted and forwarded.
Many thanks!
A simple contact form can be used. It's up to the developer's trust to hide the IP. The submitter won't see anything what is being done using PHP.
You can then update a database with the tips being posted before sending the mails.
In terms of development, you can use a plugin such as Contact Form 7 and then use its hooks to save the tips submitted before sending the mails.
While it is rather simple to set up a contact form that submits to an email address (just use the excellent ContactForm7, as rrikesh's answer suggests). However, getting anonymity right (especially against a party that has as much power and resources) is tricky. You need to be clear about the level of anonymity that you can provide. Log files, document metadata or your ISP can easily give a lot of information away.
Here are two project that have different approaches. They're both not ready-made solutions to your question, but still relevant:
PrivacyBox:
This is a web service run by the German Privacy Foundation. It's basically a message relay like the one you want, except that the user has to trust the Foundation, not you. This model highly depends on the institution providing this service. I'm sure there are other, US-based services like this.
Briefkasten:
An open source software tool used by the German newspaper Die ZEIT.
a reasonably secure web application for submitting content anonymously. It allows to upload attachments which are then sanitized of a number of meta-data which could compromise the submitters identity. Next, the sanitized files are encrypted via GPG and sent via email to a pre-configured list of recipients. The original (potentially 'dirty') files are then deleted from the file system of the server. Thus, neither should admins with access to the server be able to access any submissions, nor should any of the recipients have access to the unsanitized raw material.
This is an attempt to automate the crucial steps to strip any identifying data from the submission and encrypt it, so only the intended recipients can access it.
You would have to host this yourself, though. And it's a Python app.

email application design, how to manage attachments and messages?

I am doing an email application which will allow multiple attachments and emails will be send on schaduled date. I have some desgining issues here. Please guide me with your expereienced knowledge.
Email will be stored in db table but attachments will be stored in a folder on server. User will upload files first later his email will be stored in db. I have messages and attachments tables. But there are some cases which system should be able to handle.
How I should store attachments of emails of different users (in one folder or in multiple folders) ?
How attachment naming should be manged, more then one attachments (by one or different users) can have same name ?
User can upload files but later can leave composing message, how system will handle such atachments ?
What will be best time to save email message in db table on user button (save or draf) press or compose page request ? If you suggest on page request then how to handle messages that were not successfully finished ?
Plase guide if I am missing any thing else.
I will be more thankful for your guidance, time and sincere advice.
You have a couple of choices on storage of drafts:
Separate draft table (or set of tables)
Mark message as draft
If drafts can be auto-deleted after some time, the first is easier. It may also be easier to handle the programming to keep it isolated, but flagging the email message in the database as draft works, as well.
When to save? I would save both drafts and ready to send emails, as there is too much risk of losing them if you don't persist them and persistence to a common location is nicer.
Multiple files with same name? Either you physically separate the user's items into different directories or you change the name of the file and store the name it should have as an attachment and have it "renamed" back when the email is sent.
How to handle attachments of emails never properly composed? that is a business decision, not a technical one. Whatever you choose, the user should know the rules.

Sending mass email campaign via ASP.NET

I have read a few other posts on here about mass emailing, but I need some other information. We want to integrate our mass e-mail system into our current application, but I fear this may not be a good idea. Does anyone have any input as to what kind of resources are needed to send, potentially, 1000's of emails an hour? We only have one web server right now and do not have access to our mail server. We do have full access to our web server, however. Would it be a bad idea to host the mass e-mail application on our current server? Should we have a separate sever to run this type of application and call the server via web services (WCF)? Each email would need to be sent separately because the links on the e-mail are for tracking and unsubscribing purposes. I appreciate your thoughts.
Daniel
Yes its a bad idea,
One of the key things for detecting spam, is the IP address it came from (Known as its reputation) if you start sending out alot of emails which end up getting marked as spam (Which is likly, even if the users said they wated to recieve email) your IP address could end up in trouble. I wouldnt fancy doing this on my webserver.
As for specs, your bandwidth is going to be hit hard when you start doing somthing like this. Although I think you would be suprised at how fast you can send out emails (Mail Server Dependant)
Either way when it comes to sending mass mail campaigns out, I'd speak to a third party if its somthing you are serious about, they have the knowledge and hardware to perform campaigns that are not going to damage your IP rep.
I think this issue all depends on your mail server. I've been in a project where we sent out 50-100K emails in a few hours and the main limitation was the capacity of the mail server. In my opinion it would be fine to have the mail client run on the web server as it won't be using too much resources if well written, the main question is what the mail server can take.
You can help your reputation on some email providers by contacting them and or filling out bulk mail registrations.
This is for yahoo:
http://help.yahoo.com/l/us/yahoo/mail/postmaster/bulkv2.html
I would not recommend using exchange for anything like this. You will want a separate bulk mail server like Ironport.
http://www.ironport.com/
Otherwise your internal emails will get stuck in the queue with all of your bulk emails which you definitely don't want.
The actual code involved does not have to be that complex. In my case we used an asynchronous task to loop over an email list table in the DB pulling out a batch of 20 or so at a time sending then sleeping for a number of seconds. Email providers do not like receiving hundreds/thousands of emails from a source at one time. Even better if you can stagger the list by providers.

How would you implement database updates via email?

I'm building a public website which has its own domain name with pop/smtp mail services. I'm considering giving users the option to update their data via email - something similar to the functionality found in Flickr or Blogger where you email posts to a special email address. The email data is then processed and stored in the underlying database for the website.
I'm using ASP.NET and SQL Server and using a shared hosting service. Any ideas how one would implement this, or if it's even possible using shared hosting?
Thanks
For starters you need to have hosting that allows you to create a catch-all mailbox.
Secondly you need a good POP3 or IMAP library, which is not included AFAIK in the .NET stack.
Then you would write a Command Line application or a Service that regularly checks the mailbox, pulls messages, inserts content in db based on the "To" address (which is unique for each user), and then deletes the email from the mailbox.
It's feasible and sounds like fun. Just make sure you have all you need before you start!
If the data is somewhat "critical", or at least moderately important, do NOT use their username as the "change-data-address". Example: You might be tempted to create an address like username#domain.com, but instead use username-randomnumer#domain.com where you give them the random number if the visit the web-page. That way people can not update other peoples data just by knowing their username.
E-mails can be trivially forged. I would only do this if you can process PGP / SMime certificates in your application.
Other than that, I see no reason why not!
use a dotnet popclient to read the incoming emails, parse them for whatever you are expecting and insert the data into the database.
see codeproject website for simple popclient implementation
you would have to decided on the email content yourself, eg data only, payload of sql statements, etc
You could also identify the user based on sender address. This is how Tripit (and probably others) does it. This only requires one e-mail address on your end.
I have done something similar, using Lumisoft's IMAP client and scheduling a task in my app that checks every x minutes the configured mail address for updates. For scheduling I recommend quartz.net. No launching external processes or anything.

Resources