Geeks With Blogs
Shervin Shakibi's Blog blog

I am working on VS 2005 website, I need to send an email so I tried the Insert “Code Snippet“ feature and it inserted:

Dim email As New MailMessage()

email.To = "RecipientAddress"

email.From = "SenderAddress"

email.Body = "MessageText"

email.Subject = "SubjectText"

email.BodyFormat = MailFormat.Text

SmtpMail.SmtpServer = "SmtpServerName"

SmtpMail.Send(email)

but the designer gives you the following warning

Warning 15 'System.Web.Mail.MailMessage' is obsolete: 'This class is deprecated.  Please use the System.Net.Mail classes instead. http://go.microsoft.com/fwlink/?linkid=14202' 

so my own future refrence here is what it should be

Dim sMailServer As String = ConfigurationManager.AppSettings().Item("MailServer")

Dim sfromName As String = dr("FName").ToString & " " & dr("LName").ToString

Dim o_Client As System.Net.Mail.SmtpClient = New System.Net.Mail.SmtpClient(sMailServer)

Dim o_FromAddress As System.Net.Mail.MailAddress = New System.Net.Mail.MailAddress(sFrom, sFromName)

Dim o_ToAddress As System.Net.Mail.MailAddress = New System.Net.Mail.MailAddress(sTo, sTo)

Dim o_Message As System.Net.Mail.MailMessage = New System.Net.Mail.MailMessage(o_FromAddress, o_ToAddress)

o_Message.Subject = sSubject

o_Message.Body = sBody

o_Client.Send(o_Message)

Posted on Thursday, August 18, 2005 3:04 AM | Back to top


Comments on this post: VS 2005 Create Email code snippet needs to be changed

# re: VS 2005 Create Email code snippet needs to be changed
Requesting Gravatar...
This has been corrected in the final version.
Left by JohnChen on Oct 06, 2005 3:01 PM

# Teaching Quran
Requesting Gravatar...
Quran tutor is not only Quran tutoring service but they are a full service Quran teaching academy that has been started with a single aim to help everyone get completely free Quran lessons, Quran recitation and even Quran recitation with Quranthe Quran tutor , Tajweed, they are a group of qualified Quran tutors with pleasing personalities that has completed their masters from well renowned Islamic universities and just to help everyone get free Quran teachinthe Quran tutor ,g and learning they are devoting to help you everyone involved.
Left by QuranTutor on Nov 04, 2010 11:45 AM

# Online read Quran
Requesting Gravatar...
We are offering to online read Quran, learn online Quran, teach, tajweed, and recite online Quran from our skilled and experienced Poole of teachers, hafiz and Quari through http://www.readequran.com

Left by readquran on Dec 06, 2010 4:06 PM

# re: VS 2005 Create Email code snippet needs to be changed
Requesting Gravatar...
Thank you for afflatus and accumulate up the acceptable work thanks!
Left by Energy management solutions on Apr 09, 2011 9:50 PM

# re: VS 2005 Create Email code snippet needs to be changed
Requesting Gravatar...
Do you guys have a page on facebook or something like that? I tried to find it but couldn't find any, I would really like to become a fan! I like most of your topics.
Left by medical scheduling software on Apr 09, 2011 9:54 PM

# re: VS 2005 Create Email code snippet needs to be changed
Requesting Gravatar...
Thanks to the translate software, finally I can translate this article so I can really understand what I am reading about. Anyhow...keep up the good work.
Left by photo printing on Apr 11, 2011 2:10 AM

# re: VS 2005 Create Email code snippet needs to be changed
Requesting Gravatar...
I am very happy to be here because this is a very good site that provides lots of information about the topics covered in depth.
Left by best man speeches on Apr 11, 2011 2:11 AM

# re: VS 2005 Create Email code snippet needs to be changed
Requesting Gravatar...
You got a really useful blog I have been here reading for about an hour. I am a newbie and your success is very much an inspiration for me
Left by carpet cleaning raleigh on Apr 11, 2011 1:13 PM

# re: VS 2005 Create Email code snippet needs to be changed
Requesting Gravatar...
It’s vividly written.I definitely enjoyed. Go along such way.I delighted to read such post.I liked the way you presented your information. Now made it easy for me to understand and implement own concept.
Left by learn to trade stock on Apr 23, 2011 5:21 AM

# re: VS 2005 Create Email code snippet needs to be changed
Requesting Gravatar...
Looking very beautiful and thanks for article.. I am really impressed from this site and surely going to use it in our church this Christmas..Please upgrade more for more articles.. Thanks.
Left by pinatas on Apr 23, 2011 5:22 AM

# re: VS 2005 Create Email code snippet needs to be changed
Requesting Gravatar...
It is an inspirational stuff. Never knew that opinions could be this varied. Thanks for all the enthusiasm to offer such helpful information here
Left by electronic cigarettes review on Apr 24, 2011 10:56 PM

# re: VS 2005 Create Email code snippet needs to be changed
Requesting Gravatar...
Useful information ..I am very happy to read this article..thanks for giving us this useful information. Fantastic walk-through. I appreciate this post.
Left by Wireless Doorbell on Apr 24, 2011 10:57 PM

# re: VS 2005 Create Email code snippet needs to be changed
Requesting Gravatar...
Great review on the Blackberry handsets..I want to express my admiration of your writing skill and ability to make readers read from the beginning to the end. I would like to read newer posts and to share my thoughts with you..
Left by Stuffed Animals on Apr 25, 2011 11:18 AM

# re: VS 2005 Create Email code snippet needs to be changed
Requesting Gravatar...
I would like to thank you for the efforts you have made in writing this article. I am hoping the same best work from you in the future as well.
Left by learn to trade stock on Apr 27, 2011 7:46 AM

# re: VS 2005 Create Email code snippet needs to be changed
Requesting Gravatar...
A lot of essay writers do the pre written essays about this good topic. So it is a very good opportunity to buy custom essay papers or written essays about this topic.
Left by Rainwater Harvesting Systems on Apr 27, 2011 7:47 AM

# re: VS 2005 Create Email code snippet needs to be changed
Requesting Gravatar...
The post is pretty interesting. I really never thought I could have a good read by this time until I found out this site. I am grateful for the information given. Thank you for being so generous enough to have shared your knowledge with us
Left by social anxiety on May 07, 2011 6:26 AM

# re: VS 2005 Create Email code snippet needs to be changed
Requesting Gravatar...
When you install Win 7 and get to the network selection if you select Home you’ll be asked if you want to create a Home group.A Home group allows you to join computers to an ad-hoc grouping on a network.
hcg diet food list
Left by blogger on May 10, 2011 7:15 AM

# re: VS 2005 Create Email code snippet needs to be changed
Requesting Gravatar...
It was evident that the store did not place their best checkout clerk to monitor the self-checkout area.The clerk was unable to reset the three machines. She also did not help until I was in the process of locking up the third machine.
best resume writing services
Left by guru 4563 on May 10, 2011 7:16 AM

# re: VS 2005 Create Email code snippet needs to be changed
Requesting Gravatar...
This is true to best of my knowledge because you would need to create an email code for this purpose.
Left by acupressure on May 15, 2011 8:47 AM

# re: VS 2005 Create Email code snippet needs to be changed
Requesting Gravatar...
This has resolved the problem I was facing. Now, it works like a charm.
Left by Calgary commercial cleaning on May 18, 2011 5:16 AM

# re: VS 2005 Create Email code snippet needs to be changed
Requesting Gravatar...
I am very much pleased with the contents you have mentioned.I wanted to thank you for this great article. I enjoyed every little bit part of it and I will be waiting for the new updates.
Left by Sell Old Iphone on May 23, 2011 9:09 AM

# re: VS 2005 Create Email code snippet needs to be changed
Requesting Gravatar...
I would like to thank you for the efforts you have made in writing this article and i was stuck in a problem and thanks to your post that got it solved
Left by read quran on May 24, 2011 5:58 PM

# re: VS 2005 Create Email code snippet needs to be changed
Requesting Gravatar...
we want to retrieve the most recent weather information for a specific location, given its geographic coordinates.In particular, let's imagine that we let the user input the coordinates directly on the client and we want to visualize the latest weather data observed at the nearest weather station, avoiding the user the annoyance of the much dreaded post back.
Electric Cigarette Review
Left by vizitor on May 30, 2011 5:24 AM

# re: VS 2005 Create Email code snippet needs to be changed
Requesting Gravatar...
Very nice work. I applying the procedure and it worked like a charm.
Left by dead sea spa hotel on Jun 03, 2011 2:36 AM

# re: VS 2005 Create Email code snippet needs to be changed
Requesting Gravatar...
I followed the steps that you have mentioned in the post and though first time it didn't work but on second go I was able to do it.
Left by Dog Earrings on Jun 03, 2011 10:30 PM

# re: VS 2005 Create Email code snippet needs to be changed
Requesting Gravatar...
I applied the steps that you have mentioned and they helped me a lot. Thanks!
Left by hacer un blog on Jun 06, 2011 8:11 AM

# re: VS 2005 Create Email code snippet needs to be changed
Requesting Gravatar...
Thank you a bunch for sharing this with all of us you actually recognize what you are speaking about! Bookmarked. Kindly also consult with my web site =). We can have a hyperlink alternate arrangement among us!
Left by baby clothes on Jun 09, 2011 5:22 PM

# re: VS 2005 Create Email code snippet needs to be changed
Requesting Gravatar...
Hey, nice tutorial. You seem to be advanced programer zma
Left by zma on Jun 10, 2011 9:38 AM

# re: VS 2005 Create Email code snippet needs to be changed
Requesting Gravatar...
Thanks for taking the time to discuss this ,would you mind updating your post with additional information about nude webcams? It is extremely helpful for me to learn more about mobile live cams
Left by salam on Jun 12, 2011 10:36 AM

# re: VS 2005 Create Email code snippet needs to be changed
Requesting Gravatar...
Hey, the tutorial is good. Just wanna to say that your time isn’t going to waste with your posts.
Left by stink bug control on Jun 14, 2011 1:56 AM

# re: VS 2005 Create Email code snippet needs to be changed
Requesting Gravatar...
An innovative tutorial. Being a student working with programming codes, it's really refreshing to learn from others mistakes so one doesn't commit the same mistake.
Left by dog arthritis on Jun 14, 2011 6:16 AM

# re: VS 2005 Create Email code snippet needs to be changed
Requesting Gravatar...
This is a good guide for email marketers
tommy bahama sunglasses
Left by varei on Jun 19, 2011 3:21 PM

# re: VS 2005 Create Email code snippet needs to be changed
Requesting Gravatar...
I have been reading your blog since a long time and I 'm pleased to say that you always do a great job.
How much do psychologists make
Left by Shelly on Jun 20, 2011 6:34 AM

# re: VS 2005 Create Email code snippet needs to be changed
Requesting Gravatar...
Hey, again something of a funny nature- what do you feel dear owner of the blog when you look at your own code -related problems from the past?
Szkola Policealna
Left by Julia on Jun 20, 2011 7:51 AM

# re: VS 2005 Create Email code snippet needs to be changed
Requesting Gravatar...
Thanks for posting this article. I've spend a lot of time trying to figure this out myself. Nice blog!
mobile websites
Left by Phillipa on Jun 21, 2011 11:55 AM

# re: VS 2005 Create Email code snippet needs to be changed
Requesting Gravatar...
I looked at you snippet and it looks good to me. <ahref="http://registereddietitiansalary.org ">Registered Dietitian Salary
Left by Registered Dietitian Salary on Jun 23, 2011 6:21 PM

# re: VS 2005 Create Email code snippet needs to be changed
Requesting Gravatar...
I always find your post full of useful information. It indeed helps a lot of people out there.
breast enhancement
Left by Amanda on Jun 28, 2011 12:22 PM

# re: VS 2005 Create Email code snippet needs to be changed
Requesting Gravatar...
This is simply great effort by you Shervin. Thanks a lot for keeping us informed.
helping children learn spanish
Left by Cameron on Jun 30, 2011 12:16 PM

# re: VS 2005 Create Email code snippet needs to be changed
Requesting Gravatar...
yes, but what is also important, is the fact that you can improve, always be better and create simpler platforms! like us! with Steel Buildings
Left by Jamie de King on Jul 01, 2011 2:42 PM

# re: VS 2005 Create Email code snippet needs to be changed
Requesting Gravatar...
yes, it is in fact simple, thanks for the tutorial. Never before has someone been more clear. thanks
Digital Strategist
Left by Jamie de King on Jul 01, 2011 3:27 PM

# re: VS 2005 Create Email code snippet needs to be changed
Requesting Gravatar...
Thanks a lot for taking your time to post this. I couldn't find the resolution to my problem earlier but thanks to your article I can sort it out easily now.
business credit
Left by Jenny on Jul 07, 2011 9:16 AM

# re: VS 2005 Create Email code snippet needs to be changed
Requesting Gravatar...
I have always enjoyed this blog and the main reason is the simple design of it and the in-depth articles that get posted here.
seoelite review
Left by Cameron on Jul 09, 2011 2:52 AM

# re: VS 2005 Create Email code snippet needs to be changed
Requesting Gravatar...
The code works like a charm when implemented correctly. I have got my thing sorted out now, thanks to you.
credit repair leads
Left by Phillipa on Jul 13, 2011 6:17 AM

# re: VS 2005 Create Email code snippet needs to be changed
Requesting Gravatar...
it is something so essential to know how to build the stability of every system that you are producing, every time you do something, you need to think about the outcome!
Faux Brick Panel
Left by Nicolas on Jul 15, 2011 4:14 PM

# re: VS 2005 Create Email code snippet needs to be changed
Requesting Gravatar...
The Insert "code-snippet" does work the way it is supposed to. At first I tried that myself but after I tried your code it worked like charm.
We Buy Houses in Denver
Left by Hailey on Jul 15, 2011 10:48 PM

# re: VS 2005 Create Email code snippet needs to be changed
Requesting Gravatar...
I hope your work with VS 2005 went out pretty well. I liked the code snippet you have provided above.
Left by Kenzie on Jul 18, 2011 5:20 AM

# re: VS 2005 Create Email code snippet needs to be changed
Requesting Gravatar...
I hope your work with VS 2005 went out pretty well. I liked the code snippet you have provided above.
Left by Kenzie on Jul 18, 2011 5:20 AM

# re: VS 2005 Create Email code snippet needs to be changed
Requesting Gravatar...
...and also I tried to apply the code in my work and it works like charm. Thanks to you for that.
Cut the Rope Walkthrough
Left by Kenzie on Jul 18, 2011 5:22 AM

# re: VS 2005 Create Email code snippet needs to be changed
Requesting Gravatar...
The Insert "code-snippet" does work the way it is supposed to. At first I tried that myself but after I tried your code it worked like charm.
panic away review
Left by Camerons on Jul 20, 2011 1:07 AM

# re: VS 2005 Create Email code snippet needs to be changed
Requesting Gravatar...
I have learn to apply this code now. I like how you explain things in a simple manner and complicate it too much.

automated forex trading
Left by Elice on Jul 21, 2011 10:53 AM

# re: VS 2005 Create Email code snippet needs to be changed
Requesting Gravatar...
yes, if you have to do something, and want to achieve something, employ a coder, it would take me ages to learn the code, giving a chance to those who are better at something is an amazing chance for the both sides
Dom Projekty
Left by Jackie on Jul 22, 2011 6:17 AM

# re: VS 2005 Create Email code snippet needs to be changed
Requesting Gravatar...
Brilliant. Your post entails many useful information for someone like me.
mederma stretch marks
Left by Casey on Aug 17, 2011 8:51 AM

# re: VS 2005 Create Email code snippet needs to be changed
Requesting Gravatar...
Dear sir, do you work with Magento as well?

I have a few issues, that I would like to solve. if not would you be able to suggest someone?
Thanks a lot
For now, we would be honoured if you visited our Home Loan Comparison site:
Home Loan Comparison
Left by For Sale By Owner on Aug 25, 2011 6:32 AM

# re: VS 2005 Create Email code snippet needs to be changed
Requesting Gravatar...
Yes, computers and codes are beautiful but a bit complicated. We prefer working in association with making ourselves more beautiful. SPa and wellness related, Visit our blog
Zdrowy Styl Zycia
Left by Zdrowy Styl Zycia on Aug 28, 2011 12:04 PM

# re: VS 2005 Create Email code snippet needs to be changed
Requesting Gravatar...
I remember i tried to create email snippets in the past but i couldn't. tennis elbow cure
Left by jpon40 on Sep 03, 2011 4:45 AM

# re: VS 2005 Create Email code snippet needs to be changed
Requesting Gravatar...
yes, I see that this article is a few years old, but there are people still who love to come around and visit, and have fun. Life is so great and so much enjoyment. I see that it is your passion sir!
Szkoly Policealne . we share it also here
Left by Johnnie on Sep 04, 2011 10:51 AM

# re: VS 2005 Create Email code snippet needs to be changed
Requesting Gravatar...
hey, I have a question. I would like to link my wordpress site to paypal, would you know how to do it? I love my life, I love myself, I will print that book.. Search Engine Optimization Packages
thank you!
Left by Julie on Sep 15, 2011 11:06 AM

# re: VS 2005 Create Email code snippet needs to be changed
Requesting Gravatar...
sir, I am coming over to talk to you over your subjects of interest- coding. do you also work with magento? or Wordpress? it is interesting, because I am just beginning to develop a website, and will need some help, or maybe a few articles that are good and reliable
Ryszard
thanks
Left by Projekty Domów on Oct 03, 2011 2:05 PM

# re: VS 2005 Create Email code snippet needs to be changed
Requesting Gravatar...
Halloween is recognized for being a terror-themed festivity. This is the key reason why numerous people decide to use creepy costumes mens halloween costume to characterize the day. The most favored options for frightening Halloween Costumes come from notable fear movies and games. The Scream halloween costume, Freddy Krueger masks, and zombie outfits tend to be favorite choices for people of any age.

Left by mens halloween costume on Oct 19, 2011 9:16 AM

# re: VS 2005 Create Email code snippet needs to be changed
Requesting Gravatar...
The code still works! amazing!
Left by Bridge on Nov 04, 2011 10:16 AM

# re: VS 2005 Create Email code snippet needs to be changed
Requesting Gravatar...
I like the helpful info you provide in your articles. I’ll bookmark your weblog and check again here regularly. I’m quite certain I will learn many new stuff right here! Good luck for the next! Ovation credit
Left by Ovation credit on Dec 10, 2011 1:35 AM

# re: VS 2005 Create Email code snippet needs to be changed
Requesting Gravatar...
hey
I see that your blog is changing as well. It is a positive change. things are moving forward. More open space, more chances and possibilities. It is important and essential.Serwis Palnikow wielkopolska
Have a very happy 2012
Left by Kaloryfery on Dec 28, 2011 4:02 PM

# re: VS 2005 Create Email code snippet needs to be changed
Requesting Gravatar...
Bridge said that the code still works?
I will give it a try on our new blog, let's see.
The computer languages have not changed after all! Piosenki Swiateczne dla Dzieci
Left by Podklad Muzyczny on Dec 28, 2011 5:35 PM

# re: VS 2005 Create Email code snippet needs to be changed
Requesting Gravatar...
I really appreciate the whole entire post for its creative writing abilities.
Left by Jamecom on Feb 25, 2012 5:46 AM

# re: VS 2005 Create Email code snippet needs to be changed
Requesting Gravatar...
I tried to insert the same code snippets and i am receiving the same result. You seem to find the solution. Acer Iconia Tab A501
Left by feoa on Mar 22, 2012 10:45 AM

# re: VS 2005 Create Email code snippet needs to be changed
Requesting Gravatar...
Definitely agree with what you explained. Your explanation was certainly the easiest to understand. Tell you something, I generally get irked when folks discuss issues which they plainly don't know about. You managed to hit the nail correct about the head and explained out everything without complication.
Left by Dissertation Proposal on Mar 30, 2012 7:12 AM

# re: VS 2005 Create Email code snippet needs to be changed
Requesting Gravatar...
hey friend. I think that you should concentrate more on the issues related to your passion and to do more of what you really like. It would be incredible.Thanks for your passion, it is what world needs.
Left by Dhirsch on Apr 26, 2012 3:20 PM

# re: VS 2005 Create Email code snippet needs to be changed
Requesting Gravatar...
I recently came across your blog and have been reading along.I'm impressed. You're truly well informed and very intelligent. You wrote something that people could understand and made the subject intriguing for everyone. I'm saving this for future use.
Left by Mini led lightbars on Nov 30, 2012 3:32 AM

Your comment:
 (will show your gravatar)


Copyright © Shervin Shakibi | Powered by: GeeksWithBlogs.net