How to Send Email from your site using Gmail as your server using ASP NET
How to Send Email from your site using Gmail as your server using ASP NET
Free Online Articles Directory
Why Submit Articles?
Top Authors
Top Articles
FAQ
AB Answers
0 && $.browser.msie ) {
var ie_version = parseInt($.browser.version);
if(ie_version Hello Guest
Login
Register
Hello
My Home
Sign Out
Email
Password
Remember me?
Lost Password?
Home Page > Internet > Web Design > How to Send Email from your site using Gmail as your server using ASP NET
How to Send Email from your site using Gmail as your server using ASP NET
Posted: Oct 18, 2010 |Comments: 0
|
]]>
How to Send Email from your site using Gmail as your server using ASP NET
By: Yossi Sigura
About the Author
Yossi Sigura is a software engineer and a Cloud Computing expert with a passion for programming and programming languages. Yossi writes a few programming blogs among them are: http://www.codeanan.co.il and http://www.devschool.co.il
(ArticlesBase SC #3499285)
Article Source: http://www.articlesbase.com/ – How to Send Email from your site using Gmail as your server using ASP NET
One of the most common tasks in Web development is sending an email. We often need to give our users a way to contact us by email. We can use a good mailing method in our sites in cases of “Contact us”, “I forgot my Password” or “I would like information on” links.
We can always use HTML Mailto method, but that means that we have to assume the user has a mail client on his computer. Sometimes we want to have more control on the way the mail is sent. Maybe we don’t want our user to know that a mail was sent. In my sites I have a Connection page that let users share their opinions with me in a well formatted form. When the user clicks on the Send button I use a send mail method behind the screens.
Using asp.net it is very easy to perform this action, and because all of us like to use free services I am going to use Gmail in order to demonstrate e-mail delivery via Gmail in ASP.NET code.
We are going to use two .net classes: SmtpMail and MailMessage. in order to use them we must import System.net.Mail. We can do it by writing the following line of code at the top of the page:
Imports System.Net.Mail.
Now, all we have left to do is to write a procedure that sends the email:
Send mail with the help of Gmail
Dim objMail As MailMessage = New MailMessage ()
objMail.To.Add (jane@cloudyflow.com)
objMail.To.Add (“jon@live.com”)
objMail.From = New MailAddress (“yourname@yourdomain.com”)
objMail.Subject = “Sending Emails using Gmail services”
Dim msg As String = “Cloud computing is great!”
objMail.Body = msg
objMail.IsBodyHtml = True
Dim smtp As SmtpClient = New SmtpClient ()
smtp.Host = “smtp.gmail.com” ‘Or any other SMTP Server
smtp.Credentials = New System.Net.NetworkCredential
(“yourname@gmail.com”, “password”)
smtp.EnableSsl = True
smtp.Send (objMail)
That’s it. You can copy and paste the code and use it in your own asp.net projects.
Retrieved from “http://www.articlesbase.com/web-design-articles/how-to-send-email-from-your-site-using-gmail-as-your-server-using-asp-net-3499285.html”
(ArticlesBase SC #3499285)
Yossi Sigura -
About the Author:
Yossi Sigura is a software engineer and a Cloud Computing expert with a passion for programming and programming languages. Yossi writes a few programming blogs among them are: http://www.codeanan.co.il and http://www.devschool.co.il
]]>
Rate this Article
vote(s)
0 vote(s)
Feedback
RSS
Print
Email
Re-Publish
Article Tags:
asp, gmail, email, smtp
Latest Web Design Articles
More from Yossi Sigura
How to use TrustedSource.org for online reputation management
Learn how to use TrustedSource and other sites are used to answer questions such as – is someone sending spam that looks like it is coming from my domain, called spoofing? Has my Web site been compromised recently? Do I have an open relay email server that I don’t know about? The Internet is a nasty place, and the idea that a service can be watching globally for exploits is a good one.
TrustedSource.org
Secure Computing Inc.
55 Almaden Boulevard, Suite 500
San Jose, CA 95113
408.494.2020
(05:22)
Dr. John Selle is a primary care physician with a private practice in San Francisco. Dr. Selle believes technology is a healthy addition to his small business. Correspondent Sumi Das looks at the doctor’s tablet computer which he uses to record patient information and send electronic prescriptions to the pharmacy. Dr. Selle has also setup email and a web site for better communication with his patients. (04:01)
How to Send Email with Your Voice on Your BlackBerry
The BlackBerry is known for its ability to do email. Now, with Vlingo, you can do email using your voice. This function is available in the paid version of Vlingo for $17 a year. A great way to dictate emails when you’re on the go. (01:29)
How to Send an Email from a Computer to a Cell Phone
Learn how to send an email from a computer to almost any cell phone by watching this easy to follow video. Shows where to find a list of email addressed that cell phone companies use to send emails to phones. (05:54)
How to Change your BlackBerry Email Signature
Want to change your BlackBerry email signature from ‘Sent from my BlackBerry® wireless device’ to your own personalized signature? Well follow our tutorial guide and within minutes you’ll be sending emails as if you were on a PC. (01:54)
Flash Maps to Enhance Your Flash Website
Creating a vibrant and interactive flash website, using flash maps presents so much more than the traditional static way of viewing a selected area. Being able to highlight a pinpointed zone, enlarge it and make out in detail the subject adds another dimension to the online usage. A key example would be of the United States of America, where each state, incorporated in a flash map, can be clicked on to recognize more data for that state. This sometimes referred to as simply a ‘clickable map’.
By:
Graham Gallagherl
Internet>
Web Designl
Nov 09, 2010
XML: Scripting for the Web and Beyond
Unlike HTML, XML has no fixed tags. The user must define tags that mark individual items of data within the file. XML holds the promise of a common source definition for the Web in much the same as Rich Text Files allow formatted text to be exchanged between different word processors.
By:
Sandra Priorl
Internet>
Web Designl
Nov 09, 2010
The 3 Main Steps In Creating Your Website
Creating your own website may sound complicated. Actually, you do not need to be a techie or learn any type of complicated code. If you are searching for a guide on how to create your own website then you have to read through this site.
By:
dian ken steffenl
Internet>
Web Designl
Nov 09, 2010
Web design and development are not same
Designer and developer are the two words that come in your mind when you are looking for someone to build your website. People feel that they are the same thing; these two words are used almost interchangeably. But there is a huge difference between the two and it matters when you look at the work you want to do.
By:
Garima Salujal
Internet>
Web Designl
Nov 09, 2010
Get 3d Logo Online And Boost Your Business
The one and only solution for these quests are you must create a 3D logo design for your company. To get the one for you, 3D logo online is the exact and simple way.
By:
Julian woodl
Internet>
Web Designl
Nov 09, 2010
Why Free Website Design Companies May Not Actually Be Free
For a small business, website design fees may seem overwhelming. Good website design can often cost anywhere from a few hundred dollars for a simple website to thousands for a large or complex site that has many different functions built into the design
By:
Jeremy Horwitzl
Internet>
Web Designl
Nov 09, 2010
Designing a web site can be a crucial step in your business’ exposure, however designing a site that attracts future clients and customers can be a difficult task. If you are not familiar with website design language and are unable to build your own site, which is the case most of the time – most would believe your only other option is to hire a web designer, this is not the case.
By:
Melissa Waltersl
Internet>
Web Designl
Nov 09, 2010
Don’t Know Where To Get A Professional Web Design?
The majority of business carried out today, is done over the internet. The internet has now made it so simple to be able to find a company, product or service that can be located anywhere in the world. It is this ease of access that allows thousands of customers to search for anything they desire on the World Wide Web and is done so day in, day out. These customers are purchasing movie tickets, paying bills, and even ordering jewellery from the other side of the world.
By:
Anna Wilkinsonl
Internet>
Web Designl
Nov 09, 2010
A complete guide to timing events in Javascript with code samples and explanations.
By:
Yossi Sigural
Computers>
Programmingl
Nov 02, 2010
A complete guide with code sample on how to use cookies in ASP.NET for better sites
By:
Yossi Sigural
Internet>
Web Designl
Oct 21, 2010
How to Send Email from your site using Gmail as your server using ASP NET
Did you ever want to let your sites visitors to send mails from your site but didn’t know how to pull it off. If you did then this article will teach how to send email using only asp.net code via any SMTP server and especially via Gmail.
By:
Yossi Sigural
Internet>
Web Designl
Oct 18, 2010
ASP.NET – Using Query Strings in order to Transfer data
Transferring data from page to page – a quick guide for working with Query Strings in Asp.Net
By:
Yossi Sigural
Computers>
Information Technologyl
Sep 25, 2010
Add new Comment
Your Name: *
Your Email:
Comment Body: *
Verification code:*
* Required fields
Submit
Your Articles Here
It’s Free and easy
Sign Up Today
Author Navigation
My Home
Publish Article
View/Edit Articles
View/Edit Q&A
Edit your Account
Manage Authors
Statistics Page
Personal RSS Builder
My Home
Edit your Account
Update Profile
View/Edit Q&A
Publish Article
Author Box
Yossi Sigura has 4 articles online
Articles Categories
All Categories
Advertising
Arts & Entertainment
Automotive
Beauty
Business
Careers
Computers
Education
Finance
Food and Beverage
Health
Hobbies
Home and Family
Home Improvement
Internet
Judaism
Law
Marketing
News and Society
Relationships
Self Improvement
Shopping
Spirituality
Sports and Fitness
Technology
Travel
Writing
Affiliate Programs
Audio
Blogging
Domain Names
ECommerce
Email
Forums
Internet Marketing
Link Popularity
Newsletters
RSS
SEM
SEO
SMO
Spam
Video
Web Design
Web Hosting
]]>
Need Help?
Contact Us
FAQ
Submit Articles
Editorial Guidelines
Blog
Site Links
Recent Articles
Top Authors
Top Articles
Find Articles
Site Map
Webmasters
RSS Builder
RSS
Link to Us
Business Info
Advertising
Use of this web site constitutes acceptance of the Terms Of Use and Privacy Policy | User published content is licensed under a Creative Commons License.
Copyright © 2005-2010 Free Articles by ArticlesBase.com, All rights reserved.
Yossi Sigura is a software engineer and a Cloud Computing expert with a passion for programming and programming languages. Yossi writes a few programming blogs among them are: http://www.codeanan.co.il and http://www.devschool.co.il









