Storing selected emails from outlook in SQL Server by forwarding - sql

This may not be possible but just wanted to see if anyone could point me in the right direction.
I am building a system that needs to store all corespondence between the company and each client.
Is it possible to forward an email from outlook to a certain email address that will then store this email in an SQL server.
Thanks for any help.

You can try this Outlook Add-on: www.geniusconnect.com
Link Sent Items Outlook Folder to your table and check "Auto Save" option. This will save sent items automatically to DB.

You could write an outlook add-on using .NET that inserts the contents of the e-mail into a SQL Server table and the sender information.

Try looking at it the other way around. Build your email in the database first, then have a separate process actually send out the emails. After every successful send, you mark database email record as "sent".
I recommend an asynchronous approach. As emails are to be sent, they are generated and stored in an EmailQueue table. Another process monitors the EmailQueue table and sends out the emails as it discovers them. This way any delay with the actual sending of email will not interfere with the process that is generating the emails to be sent.

Related

Writing data from email to SQL server 2008R2

Following our company processes, our database has to send an email to a manager requesting for approval for some document record changes.
I was wondering if it was possible for the manager to reply to the server with an email containing "Yes" or "Approved" with the document# and have it update the document record accordingly. Right now, the manager has to send the QA dept the approval email, and they have to update the document record manually.
I have looked at SQL Mail, but it seems to be a bad way to go according to a lot of places.
We use Exchange 2010 and SQL Server 2008
Thanks!
Do you have IIS installed in your environment? If so, you can redirect the user from Mail (Outlook) to a service page to update the document approval flag.
If so, create a ASP or ASPX page that takes two query parameters. A document id and a approval notice.
Put two links in the email for the manager to click. You will have to send the email from SQL server with a HTML body. Enclosed are sample links for document 123.
Approve Change
Reject Change
Check out www3schools link below for details query string.
http://www.w3schools.com/asp/coll_querystring.asp
Check out the link below for details on working with databases.
http://blogs.msdn.com/b/morebits/archive/2010/09/26/working-with-data-beginners-guide-to-database-in-asp-net-web-pages-part-1.aspx
As an added feature, you might want to record the Active Directory (Windows Login) of who approved or rejected the document. That way, someone can not approve the document themselves. A date/time might be also handy.
This is one of many solutions you can use.

Preventing an email from being sent to Outlook's Junk folder

I'm writing an application that creates a word document and emails it to a user from our shared mailbox. The code works fine, however the message is delivered to the Junk folder instead of the Inbox.
I believe this is because it's coming directly from the email address (mymailbox#company.com), instead of the mailbox name in our Global Address List (My Mailbox).
Is there a way to get VB.Net to recognize my Global Address List so I can send directly from the mailbox name; or is there another solution to this problem?
You can set the "from" address in mailmessage.from to the proper email address. However, the "from" address is usually not enough to get an email sent to the spam folder.
There are several steps you can take to make it more likely your email gets through. The links in the comment above Rachel Gallen cover these pretty well.
http://www.allspammedup.com/2009/09/7-ways-to-prevent-your-emails-being-blocked-as-spam/
http://www.interspire.com/content/2006/09/28/improve-your-email-delivery-rates/
Just why something ends up in the junk mail is something set by the recipient's email client and/or ISP and not something you have control over. You may be able to maximise your chances of appearing to be non-spam by making your email have fewer spammy characteristics - if you could re-cast your sending system to create the message as an email rather than an attachment this may help.

Insert record through email on rails

I have developed a messaging system on rails3.As per the requirements, when User A commented any message to UserB then the message will be stored on the DB, also email notification will be sent.
Now my requirement is When User B replying the email notification though mail with some messages, it should get inserted on the DB.
This is a rather complex task compared to sending emails. Essentially, you'll have a few steps:
Set up a receive method in your mailer
Set up your email server to forward emails to your app
Handle processing the email content
Save into the database
Probably the most straight-forward explination of the entire process can be found in this rails guide.

How to retrieve only new emails using POP3 protocol

I am using POP3 protocol to retrieve my emails in my .NET application. I need to read just new emails only but found in many blogs that it is not possible to retrieve just "unseen" or "new" mails using POP3. Is that true? If so, could you please help me understand how Outlook Express manages to get new mails using POP3?
Is there any way that I can flag the seen mails in the email server itself? Or please help me find out a way to retrieve new mails using POP3 protocol.
You have to store the UIDL of each email in a local database. When you want to check for new mail, you retrieve the UIDLs on the server and see if you have if already in your local database; if not, it's a new mail.
Outlook uses the same strategy, BTW (see this KB article).
As long as your mailbox doesn't keep a copy of the emails on the server then you are fine and don't have to code for this.
Normally when an email client access the emails from a POP3 box they are downloaded and removed from the server.
Exchange is a different thing entirely.
Cheers

Track bounced back newsletter emails

I've built a newsletter system which tracks:
Openings
Link clicks
Unsubscriptions
However, I need to find a way of tracking which newsletter emails 'bounced back'.
Has anyone done this before and whats the best way of doing it?
When sending the mail via SMTP you supply the FROM command which is sometimes referred to as the 'Sender' or 'Envelope Sender'. This is separate from the From: header in the email itself. What you want to do is to create a 'bounced' mailbox and set that as the 'Sender' for the email. If there is a bounce, then most mail servers will send a (NDR) notification back to this sender.
Then you need to periodically check this mailbox for NDR's and parse them for the original recipient and if it was a hard or soft bounce. There are various libraries that can do this for you such as ListNanny