Posts

Showing posts from March, 2013

Featured Post

Smart Product designer

Image
download and purchase link: https://alkanyx.com/item/49/Smart+Product+designer

Live preview : http://smartproductdesigner.000webhostapp.com/

Smart Product Designer is a  tool to create your own product and get directly from your website. It is well documented, very easy to customize and use. It is build using most advance technologies including javascript, jQuery and html5.
Features Choose different product from collectionAdd custom texts to product.Change text colorChange the size and font of the TextLet the user drag, move or remove elementsAdd images to product selected from art gallery or browse it from systemDesign both frontside and back-sideShows preview while designingDownload designVery easy to customize and useHere is the purchase link : https://alkanyx.com/item/49/Smart+Product+designer

Send email using C# - details

Here are the details for the classes and properties used in my previous post:

Simple Mail Transfer Protocol is an Internet standard for email transmission across IP networks.

System.Net.Mail: It is namespace contains classes used to send e-mail to a Simple Mail Transfer Protocol server for delivery.

In the previous post,  following two classes of System.Net.Mail are used:

MailMessage - represents the contents of mail  message.SmtpClient - transmit email to the SMTP host that you designate for mail delivery.Note: We can also use "Attachment class" to create mail attachment.
Details about properties and functions of MailMessage class which are used in our program: MailMessage.From - Gets or Sets the from address for current email messageMailMessage.Subject - Gets or Sets the subject line for current email messageMailMessage.Body - Gets or Sets the message bodyMail.To - Gets the address collection that contains the recipients of current email messageMail.To.Add() adds the recipients …

Send email using C#

In my previous post I wrote about sticky notes type application. By using that application a user is able to take small notes. As soon as user closes the notes, the application saves the user notes. So next time when user again launches the application, then user is provided with his notes.

Now I am adding one more functionality to this application. By using this functionality user will be able to send his notes to a specified email. 
To implement this functionality we need to add following libraries in the project: using System.Net.Mailusing System.Net.Mime
Add a link label at the bottom of the form. On the Click event of link label write the logic for sending email. 
Here is the code snippets:


            SmtpClient SmtpServer = new SmtpClient();  SmtpServer.Credentials = new System.Net.NetworkCredential("xyz@gmail.com", "xyz");
            SmtpServer.Port = 587;
            SmtpServer.Host = "smtp.gmail.com";             SmtpServer.EnableSsl = true;             …