Saturday, March 21, 2015

Send mail using Outlook and .oft templates

There is already a page for sending mail using Outlook library.
Now this small code is a small tweak i.e. using Outlook Template (*.oft) file.

If you see the code there is hardly any complication but this exercise is time consuming as a whole.
It is because defining the different mail templates takes a lot of time from business POV.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Outlook = Microsoft.Office.Interop.Outlook;

namespace emailTemplateTest {
 class Program {
  static void Main(string[] args) {
   try {
    Outlook.Application otApp = new Outlook.Application(); // create outlook object
    Outlook.NameSpace ns = otApp.Session;
    Outlook.Folder folder = otApp.Session.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderDrafts) as Outlook.Folder;
    Outlook.MailItem otMsg = otApp.CreateItemFromTemplate(@ "d:\a2.oft", folder) as Outlook.MailItem; // Open the mail template
    Outlook.Inspector oInspector = otMsg.GetInspector;
    Outlook.Recipient otRecip = (Outlook.Recipient) otMsg.Recipients.Add("Temp@hotmail.com");
    if (otRecip.Resolve()) // validate recipient address
    {
     // Modify the body text as required
     otMsg.Send(); // Send Mail
     otRecip = null;
     otMsg = null;
     otApp.Quit();
    }
   } catch (Exception e) {
    Console.WriteLine("{0} Exception caught: ", e);
   }
  }
 }
}

102 comments:

  1. Raipur girls welcoming you to making you relax and happy by their top class physical services, and at the same time the independent Raipur Escorts are available at you reasonable price.
    http://www.raipurescort.com

    Raipur Escorts

    Raipur Escort

    Raipur Escorts service

    Raipur Escorts Agency

    Independent Raipur Escorts

    Independent Raipur Escort

    Raipur Escorts Girl

    Escorts in Raipur

    Escorts Service in Raipur

    ReplyDelete
  2. Welcome to High Class Surat Escorts Service, the luxurious Surat Escort Services where you can find the most beautiful Escort Sexy and Hot Call girls in Surat and Other Citys Best Escort Services in India.

    Surat Call Girl, Surat Escorts Service

    Surat Call Girls, Surat Escorts

    Call Girls in Surat, Surat Escort

    Surat Escorts, Call Girl in Surat

    Surat Escorts, Surat Escort Service

    ReplyDelete
  3. Mumbai Escorts sillky.in Do not be shy, tell your wish to me, experience-your objectives and should be to the really ecstasy that's me, the usually, the one, for you in here I will be a little, table beauty with awesome perspective, prolonged black smooth locks and interest that is hypnotic.
    Mumbai Escorts, Independent Mumbai Escorts http://sillky.in
    Mumbai Escorts Service, Mumbai Escort http://www.dimpy.in
    Mumbai Call Girl, Call Girls in Mumbai http://www.mumbaicallgirlservice.com
    Call Girl in Mumbai, Mumbai Call Girls http://www.callgirlservicemumbai.com
    Mumbai Escorts, Mumbai Call Girl Service http://www.callgirlinmumbaiescorts.com
    Mumbai Escorts, Mumbai Call Girls http://www.mumbaiescortss.biz
    Call Girl in Mumbai, Call Girls Service in Mumbai http://www.mumbaiescortscallgirl.com
    Mumbai Escorts, Call Girls in Mumbai http://www.meghnakaur.com

    ReplyDelete
  4. Welcome to High Class Surat Escorts Service, the luxurious Surat Escort Services where you can find the most beautiful Escort Sexy and Hot Call girls in Surat and Other Citys Best Escort Services in India.

    Visit The Site For More Details -: http://www.anuroy.com/

    Chennai Escorts, Chennai Call Girls

    Chennai Call Girl, Chennai Escorts Service

    Call Girls Chennai, Chennai Escort

    Chennai Escorts, Chennai Escorts Service

    Call Girls in Chennai, Chennai Escort

    ReplyDelete
  5. Nice And Informative Website. Please Keep Continue Such Kind Of Effort. I Shared Your Post With My Friends Also. I Run My Independent Mumbai Escorts Service. I Provide You High Class Mumbai Models And Beautiful Mumbai Call Girls. We Are Available To Serve You 24 X 7. For Booking Contact With Priya Singh Ph- 09987215552
    Wensite : http://www.escortagencyinmumbai.com/
    mumbai escorts service
    mumbai escorts
    mumbai escort service
    escort service in Mumbai
    mumbai call girls
    Andheri escorts
    Bandra escorts

    ReplyDelete
  6. mumbai escort provided beautiful modal,college girls for you.we have Independent Models, college girls for your Beautiful night
    mumbai escort

    ReplyDelete
  7. we are provided escort service in Mumbai 24 for hours with full arguments, our escorts all type services available for the unlimited time full enjoyment of our independent escort service in Mumbai

    Mumbai escort service

    Escort service in Mumbai

    independent escorts service in Mumbai

    Mumbai independent escorts

    Call girls in Mumbai

    Mumbai Call girls

    escorts service in Andheri

    Andheri escorts service

    ReplyDelete
  8. Udaipur call girls
    independent udaipur escorts
    escorts in udaipur
    Udaipur escorts service
    We are top service provider established in Udaipur city. There are many companion girl in Udaipur. But our girls fully educated and hot they know all the needs who want to need a man with her.

    ReplyDelete
  9. You can ask that closeness fulfillment what you lack from any woman yet. Each one of the three holes of her is reliably start for you with totally satisfying closeness delight. Typically consider any sex-related accepted and recognize it with our eye-getting Chandigarh Escorts.

    Chandigarh Escorts
    Chandigarh Escorts Service
    Escorts in Chandigarh

    ReplyDelete
  10. It is an extensive variety of data brings you towards the best one that would assistance be able to you satisfy your dreams. Albeit, numerous are there to have enough enthusiasm for meeting every one of your desires however certainly everybody has diverse.

    Noida Escorts
    Noida Escorts Services
    Escorts in Noida

    ReplyDelete
  11. It is center to numerous superb and appealing escort women as there is no insufficiency of amazing deceivability of appeal world there. That is the reason looking an appeal toy in the town isn't a testing procedure for anybody; the every one of the one need is simply to arrange bolster elements of an escort Agra with the individual details.

    Agra Escorts
    Agra Escorts Service
    Agra Escort

    ReplyDelete
  12. Our Chandigarh Escorts Service isn't for the people who are consistently hunting down recompenses and more since that are just particularly less than ideal. We simply offer administrations to our clients who are not easygoing about it and who require satisfaction in their life.

    Chandigarh Escorts
    Chandigarh Escorts Service
    Escort Service in Chandigarh

    ReplyDelete
  13. High class escorts in Chandigarh cherish working separately and going by to their customers all alone level and getting the administration charges straightforwardly from their customers to keep their full procuring. Along these lines, plainly free escorts are living better life in contrast with the individuals.

    Chandigarh Escorts
    Chandigarh Escorts Services
    Escorts in Chandigarh

    ReplyDelete
  14. The request of master and very much prepared escorts is expanding step by step in metro urban areas so that in Noida. I am absolutely eager about the Noida escorts girls gave by for you. One of our clients showed that he got the ever best sexual involvement with our friend woman.

    http://www.hunny.co.in/
    http://www.noidaescort.com/
    http://www.noida-escorts.co.in/
    http://www.feelofhaven.in/
    http://www.lovedesire.in/
    http://www.noidaescorts.ind.in/
    http://www.noidaescorts.net.in/

    ReplyDelete
  15. They need aid further separated under Different types: model, airhostess, camera person and so on. Though photography may be your pastime afterward this kind from claiming will make a perfect one sets for you. escorts service in mumbai
    Call Girls Mumbai
    andheri escorts
    mumbai call girls services
    mumbai escorts
    andheri escorts service
    wadala call girls
    vashi call girls
    mumbai call girls services

    ReplyDelete
  16. I’ve been surfing online more than three hours today, yet I never found any interesting article like yours.

    ReplyDelete
  17. Your Website Is Nice And Informative. Please Keep Continue Such Kind Of Good Effort. My Name Is Ritu Sharma. I Run My Own Independent Mumbai Escorts Service. I Provide You VIP And Independent Escort Service In Low Cost. You Can Avail My Mumbai Escort Service At Your Own Place Or In Hotel. I Am Available To Serve You 24 X 7. If You Want To Test Me, Visit- www.escortservicemumbai.net Please Call Me- +91 9OO4OO9481
    Independent Mumbai Escorts Service
    mumbai escorts
    mumbai escort service
    escort service in mumbai
    independent mumbai escorts
    Independent escorts service
    independent escorts

    ReplyDelete
  18. Hi
    I read your articles. Your all article is very informative. Thank for sharing.
    Chennai Escorts
    Chennai escorts

    ReplyDelete
  19. I Read your blog and i found that its a full of informative data thank you for posting.

    Chennai Escorts
    Chennai Escorts

    ReplyDelete
  20. Hi,
    Thank You for sharing new article. It is very informative article.
    Chennai Escorts
    Chennai escorts

    ReplyDelete
  21. I Read your blog and i found that its a full of informative data thank you for posting.

    Chennai Escorts
    Chennai Escorts

    ReplyDelete
  22. The way in which you explain the things are simply amazing. You should keep writing more stuff like this. Please have a look at my official website if you are interested in hiring best Mumbai Escorts.

    ReplyDelete
  23. You have to keep up something which you may take a gander at donning at some point or another despite the fact that. Distributions which focus on design issues are a simple method to get styles specifically to your letter drop.
    Candigarh escorts
    Chandigarh escorts service
    Escort in Chandigarh
    Escorts service in Chandigarh
    Chandigarh Call Girls service

    ReplyDelete
  24. There are boundless additional items created basically for hair. Head of hair additional items are stuff like locks bows, headbands and pig tail stands, yet they likewise join your hair expansions.
    Noida escorts
    Noida escorts service
    Noida escorts services
    escorts in Noida
    escorts service in Noida
    Noida Call Girls service

    ReplyDelete
  25. My Vadodara escorts benefit is accessible as completely proficient yet much-modified compose in order to suit your preferences and wants. Get with me to feel the distinction that you..

    visit the website for more details -:Vadodara Escorts

    Vadodara Escorts, Vadodra Escorts Service

    Vadodara Call Girls, Vadodara Escorts

    Call Girls in Vadodara, Vadodara Escort

    Vadodara Call Girl, Call Girls Service in Vadodara

    Vadodara Escorts, Call Girls in Vadodara

    Vadodara escorts benefit giving you autonomous escorts in Vadodara, implies you can appreciate benefit with more joy and love every free escort are experts and experienced.

    ReplyDelete
  26. Mumbai Escorts- Independent High Profile VIP Call Girls in Mumbai.For decent and sizzling mumbai Escorts Services of Call Girls, Independent Mumbai Escorts and fashionable excessive class Mumbai name women. The maximum cute and erotic http://www.Escortservicesmumbai.Com/ http://www.Escortgirlinmumbai.Com/ mumbai escorts, mumbai escorts carrier, mumbai escorts enterprise, mumbai independent escorts, mumbai lady escorts, name girls in mumbai, karishma sharma, mumbai name women, independent mumbai escorts, unbiased name women mumbai, vip call girls, high profile call women mumbai.Escort provider is to be had at an cheap fee. We provide the most stunning name girls and now you can call for Escort offerings. We provide completely agreed ladies in Mumbai

    ReplyDelete
  27. I think this is best platform for getting new world's information. You are working with time. Great job. Thank you

    delhi russian escorts

    http://blog.jaskaur.in/

    Independent Escorts in Delhi
    Call girls in Delhi
    Delhi Russian Escorts
    Aerocity escorts
    Mahipalpur escorts
    Karol Bagh escort

    ReplyDelete
  28. I request you to write some vlogs for my website and I can also provide you backlinks to your website plz visit
    Call girls in Guwahati
    Call girls in Bangalore
    Call girls in Bangalore
    Call Girls in Jammu
    Call Girls in Noida

    ReplyDelete
  29. Thanks for your amazing post Visit our website in case you want to make your trip romantic
    Escorts in Gurgaon
    Escorts in Kolkata
    Escorts in Kolkata
    Escorts in Pune
    Escorts in Pune

    ReplyDelete
  30. I request you to write some vlogs for my website and I can also provide you backlinks to your website plz visit
    Escorts in Guwahati
    Escorts in Bangalore
    Escorts in Bangalore
    Escorts in Jammu
    Escorts in Noida

    ReplyDelete
  31. Welcome to High Class Ahmedabad Escorts Service, the luxurious Ahmedabad Escort Services where you can find the most beautiful Escort Sexy and Hot Call girls in Ahmedabad and Other Citys Best Escort Services in India.

    Visit The Website For More Details -: Ahmedabad Escorts

    Ahmedabad Call Girl, Ahmedabad Escorts

    Ahmedabad Escorts Service, Ahmedabad Escorts

    Call Girls in Ahmedabad, Ahmedabad Escorts

    Ahmedabad Escorts, Ahmedabad Call Girls

    Ahmedabad Call Girl, Call Girls in Ahmedabad

    Call Girls in Ahmedabad, Ahmedabad Escorts Service

    Ahmedabad Escorts Service Call Girls in Ahmedabad

    Ahmedabad Escorts, Ahmedabad Call Girls

    The young ladies you will discover working with 100% fulfillment top south young ladies Ahmedabad escorts ,all genuine south Ahmedabad Service. In this way, our south Ahmedabad escorts young ladies are very looked for after and they are the heartthrobs to the men.

    ReplyDelete
  32. Call 8968730812 for escorts in Chandigarh. We provide hot and sexy call girls in Chandigarh for 24/7 incall or outcall escort services. Our Chandigarh escorts are available in all top hotels including 2*3*4*5* of Chandigarh.We provide celebrity escorts, model escorts , independent escorts , high profile escorts , housewife escorts , and college escorts to cater escort services in chandigarh to our clients.
    http://www.escortinchandigarh.com/

    ReplyDelete
  33. Call 9681199245 for escorts in kolkata. We provide hot and sexy call girls in kolkata for 24/7 incall or outcall escort services. Our Kolkata escorts are available in all top hotels including 2*3*4*5* of kolkata.We provide celebrity escorts, model escorts , independent escorts , high profile escorts , housewife escorts , and college escorts to cater escort services in chandigarh to our clients.
    https://www.kolkataescortsgirl.com/

    ReplyDelete
  34. Call 08082132664 for escorts in Jammu. We provide hot and sexy call girls in Jammu for 24/7 incall or outcall escort services. Our Jammu escorts are available in all top hotels including 2*3*4*5* of Jammu. We provide celebrity escorts, model escorts , independent escorts , high profile escorts , housewife escorts , and college escorts to cater escort services in Jammu to our clients.
    http://www.callgirlsinjammu.com/

    ReplyDelete
  35. Call 8081111169 for escorts in Gurgaon. We provide hot and sexy call girls in Gurgaon for 24/7 incall or outcall escort services. Our Gurgaon escorts are available in all top hotels including 2*3*4*5* of Gurgaon. We provide celebrity escorts, model escorts , independent escorts , high profile escorts , housewife escorts , and college escorts to cater escort services in Gurgaon to our clients.
    http://gurgaon.bluelovenight.com/

    ReplyDelete
  36. I read your post. This Very nice and informative for all who searching these kind of information. Thank you for posting.


    Chennai Escorts

    Mumbai Escorts

    Chennai Escorts

    ReplyDelete
  37. Five years ago I also used to have a site with the same concept. So, when I find yours it becomes very hard for me to stop for commenting here. I have bookmarked it for further use.
    http://www.bustychennaiescort.com/
    http://chennaiescortszone.com/
    http://vhighprofile.com/

    ReplyDelete

  38. Hello and welcome to all of you my dear friends i am payal saxena from indore escorts and indore call girls i am providing here the top class escorts service all over the indore i giving you thanks verry much it can`t complete without your help/supports we will remember it too always.

    visit my different websites :

    Indore Escorts
    Call Girls In Indore
    Indore Call Girls
    Call Girl In Indore
    Indore Escorts Service

    ReplyDelete
  39. colaba escorts is well qualified escorts companion service provider and gives ultimate escorts service entire Mumbai like andheri, powai, mira road and much more areas when you call her, book online colaba escorts service and enjoy grate time with her for more info visit at agency website.
    andheri escorts
    mira road escorts
    colaba escorts
    powai escorts

    ReplyDelete
  40. Mumbai Escorts Hello people Welcome to the maximum famous and first-rate Call Girls organisation agency of Regional
    nearby Indian neighborhood in Mumbai. Our touch females organisation lately started out imparting the sensitive women to
    each seeking out man in Mumbai Our Call Girl Service Mumbai is specifically high-quality in Regional local Indian
    nearby. Mumbai Escorts Girls, Call Girls in Mumbai.Independent Call Girl Escort Service in Mumbai.Individuals compare
    out right here from anywhere inside the entire global to have visited and spot the sex-associated a laugh inside the
    location with great elements. With one of kind elements individuals evaluate out proper here, a number of the want to
    research the Mumbai proper right here and a few tests out for the agency provides. On the forestall of the day, you may
    for the final satisfactory and leisure.

    Visit My site :- http://www.Escortservicesmumbai.Com/

    Visit My site :- http://www.escortgirlinmumbai.com/

    Visit My site :- http://www.escorts69.biz/

    ReplyDelete
  41. Mumbai Escorts Hello people Welcome to the maximum famous and first-rate Call Girls organisation agency of Regional
    nearby Indian neighborhood in Mumbai. Our touch females organisation lately started out imparting the sensitive women to
    each seeking out man in Mumbai Our Call Girl Service Mumbai is specifically high-quality in Regional local Indian
    nearby. Mumbai Escorts Girls, Call Girls in Mumbai.Independent Call Girl Escort Service in Mumbai.Individuals compare
    out right here from anywhere inside the entire global to have visited and spot the sex-associated a laugh inside the
    location with great elements. With one of kind elements individuals evaluate out proper here, a number of the want to
    research the Mumbai proper right here and a few tests out for the agency provides. On the forestall of the day, you may
    for the final satisfactory and leisure.

    Visit My site :- http://www.Escortservicesmumbai.Com/

    Visit My site :- http://www.escortgirlinmumbai.com/

    Visit My site :- http://www.escorts69.biz/

    ReplyDelete
  42. You will most possibly make the foremost go to be looking for the services of qualified humans to grow to be section of their team of escorts service at very affordable cost available.

    Cheap Chandigarh Escorts
    Noida Escorts Girls
    Agra Call Girls

    ReplyDelete
  43. Welcome to the world of dreams, you reach VIP call girls in Noida Services Agency! You may be worth a leading Noida Escort girl, which offers the best in class entertainment and service.

    Visit The Website For More Details -: Noida Escorts

    Noida Escorts, Noida Call Girl

    Noida Escorts Service, Noida Escorts

    Noida Call Girls, Noida Escorts

    Call Girl in Noida, Noida Escorts Service

    Noida Escorts is a place like heaven? When Noida comes to mind, you flood with awesome beaches, beautiful sea sides and magnificent views and cottages. It is famous for its nightlife and gorgeous girls.
    To enjoy Noida's respected environment, you will find many wonderful activities for the person who loves you.

    ReplyDelete
  44. Book a wonderful girl, for any purpose, both are included in their beautiful flats and especially boycott in hotels or apartments. In Greater Noida, our VIP, escort call girls, gives you 24x7 anytime, whatever you think at any time. You will be impressed by Greater Noida's best collection of escorts for enjoyment and satisfaction.
    Greater Noida Escorts Ensure that they make great time for you, and entertain your night with love, excitement and fun.

    Visit The Website For More Details -: Greater Noida Escorts

    Greater Noida Escorts, Greater Noida Escorts Service

    Greater Noida Call Girl, Greater Noida Escorts

    Greater Noida Escorts Service, Call Girl In Greater Noida

    Greater Noida Escorts, Independent Greater Noida Escorts

    Call Girls in Greater Noida, Greater Noida Escorts

    Greater Noida Escorts Service, Greater Noida Escorts

    Greater Noida is famous for its nightlife fun with hot and sexy women and is the center of natural Indian escort beauties. Greater Noida's funds are known for sexual pleasure, and they are the best female partners for merchants.
    Your time together is sure to be both key and Incredible when to spend your nightlife with bubbly Greater Noida Escort Girl.

    ReplyDelete
  45. Amritsar Independent models girls agency,Joining these qualities with their enchanting, warm and drawing in identities finishes the aggregate bundle that we offer our customers.
    http://www.latasen.in
    Amritsar Escorts
    Amritsar Escorts Agency

    ReplyDelete
  46. Sharing the organization of such young ladies is what might as well be called enjoying the incomparable extravagances throughout everyday life. Amritsar escorts agency.
    http://www.romaescorts.biz
    amritsar escorts
    amritsar escorts agency

    ReplyDelete
  47. Thanks For share complete Information with us. I hope you keep continue this type article. I am Nancy Chopra an Independent Girl from Hyderabad and Gives to all People escorts service in Hyderabad.
    Website - http://www.nancychopra.net/
    Hyderabad Independent Escorts
    Escorts Services in Hyderabad
    Hyderabad Escorts Services
    Hyderabad Call Girls

    ReplyDelete