Home   Buy Now   Products   Downloads   Support   Resellers   Contact   Site Map  
Home   Buy Now   Download   Support  
Email Component, SMTP Component, POP3 Component, IMAP Component, bulk mail

Home
Purchase
Upgrade
 
Products
Downloads
 
Support
 Samples
 KB
 Forum
 
Newsletter
 
Customers
 Current List
 Comments
 
Resellers
Jobs
Contact Us
 February 18, 2003  

Volume 1, Issue 2 

Page Navigator: << Back, 1, 2, 3, 4, Next >>

The absolutely easiest and fastest way to send email...

This one line of code will create and send an e-mail message.  It uses the FreeSMTP.Net assembly, which can be downloaded here.  More on FreeSMTP.Net in a minute...

VB Sample	
Quiksoft.FreeSMTP.SMTP.QuickSend( _
   "mail.yourdomain.com", _
   "recipient@domain.com", _
   "sender@domain.com", _
   "Subject...", _
   "Message text.", _
   Quiksoft.FreeSMTP.BodyPartFormat.Plain)
C# Sample			
Quiksoft.FreeSMTP.SMTP.QuickSend(
    "mail.yourdomain.com",
    "recipient@domain.com",
    "sender@domain.com",
    "Subject...",
    "Message text.",
    Quiksoft.FreeSMTP.BodyPartFormat.Plain);

It doesn't get much easier than this.  Add a reference to the FreeSMTP.Net assembly, and call the QuickSend method.  Because the QuickSend() method is static, you do not even have to instantiate a class.  The method will even allow the sending of HTML messages, by setting the last parameter to BodyPartFormat.HTML.

FreeSMTP.Net is free as its name implies.  But don't think that because it is free, that it is not good.  FreeSMTP.Net is produced by Quiksoft who also produces the popular EasyMail Objects, EasyMail Advanced API and EasyMail .Net EditionQuiksoft specializes in e-mail technologies for professional developers.  FreeSMTP.Net is offered by Quiksoft as an introduction to its product line.  It is not often that you find quality in things for free, but FreeSMTP.Net is clearly an exception.

Sending an attachment...

Since the QuickSend() method does not support attachments, we will instantiate the FreeSMTP.Net EmailMessage object, add the attachments and send it with an instance of the FreeSMTP.Net SMTP class.  As you can see, all this requires only a few lines of code.

VB Sample	
Dim msg As New EmailMessage( _
   "recipient@domain.com", _
   "sender@domain.com", "Subject...", _
   "Message text.", _
   BodyPartFormat.Plain)
msg.Attachments.Add("c:\\attachment.txt")
Dim smtp As New SMTP("mail.yourdomain.com")
smtp.Send(msg)
			
C# Sample			
EmailMessage msg = new EmailMessage(
   "recipient@domain.com",
   "sender@domain.com", "Subject...",
   "Message text.",
   BodyPartFormat.Plain);
msg.Attachments.Add("c:\\attachment.txt");
SMTP smtp = new SMTP("mail.yourdomain.com");
smtp.Send(msg);

Sending HTML message with support for non HTML mail readers...

To send an HTML message with support for non HTML mail readers, we must actually send two message bodies.  One is formatted in HTML and the other in plain text.  Mostly every non HTML mail reader will be able to ignore the HTML and display the text body instead.

Many people are using the System.Web.Mail class to send mail through their .Net apps, but there are many reasons why this might not be the best route.  We will touch on this again, but for now I would like to point out that the System.Web.Mail class does not support sending more than one body format in the same message.  Therefore, the System.Web.Mail classes do not allow you to send an HTML message with support for non HTML readers.

VB Sample	
Dim msg As New EmailMessage( _
   "recipient@domain.com", _
   "sender@domain.com", "Subject...", _
   "Text message.", BodyPartFormat.Plain)
Dim html As New String( _
   "<html><body><b>HTML</b> message.</body></html>")
msg.BodyParts.Add(html, BodyPartFormat.HTML)
Dim smtp As New SMTP("mail.yourdomain.com")
smtp.LogFile = "c:\\smtp log.txt"
smtp.Send(msg)

C# Sample
EmailMessage msg = new EmailMessage(
   "recipient@domain.com",
   "sender@domain.com", "Subject...",
   "Text message.", BodyPartFormat.Plain);
string html =
   "<html><body><b>HTML</b> message.</body></html>";
msg.BodyParts.Add(html, BodyPartFormat.HTML);
SMTP smtp = new SMTP("mail.yourdomain.com");
smtp.LogFile="c:\\smtp log.txt";
smtp.Send(msg);

In this example we instantiate an EmailMessage class using the overloaded constructor to create a plain text message.  Next we add a new body part to the message formatted as HTML.  The FreeSMTP.Net assembly will automatically use this information to create a message that contains both plain text and HTML versions of the message.  Beneath the hood, the Send() method builds a MultiPart Alternative MIME message.  The developer is shielded from the complexity of MIME, but can rest assured that their message is compatible with mostly every mail reader.

Continue on to find out about the #1 problem that affects most developers sending e-mail from their apps...

Page Navigator: << Back, 1, 2, 3, 4, Next >>


In This Issue:

Learn how to send mail from your .Net applications the free and easy way. 

Plus:
Downloadable code to get you started right away


This Issue's Poll:

How do you format the messages sent by your application?

Text only
HTML only
HTML with alternative text
Recipient decides


Signup for this Newsletter:

CRITICAL tips and tricks for e-mail developers


Quiksoft News:

For a limited time, Quiksoft is enabling developers to license the SMTP portion of EasyMail .Net Edition separately.


EasyMail .Net EditionEasyMail .Net Edition
Written in C# and engineered by the leader in e-mail development, EasyMail .Net Edition is the easiest and most reliable way to integrate full-featured e-mail functionality into your .Net apps. Read the comparison for more information.

Buy  Download   Info
 


Customer Comments

"Quiksoft's technical support is excellent. I wish all of our vendors were as responsive and helpful with technical support requests. "

"It paid for itself just after this project."

"I think your product is fantastic. The documentation is clear and consise."

Read More...


E-mail this newsletter to a friend or to yourself:

Unsubscribe...

Printer Friendly Version...

©2003 Quiksoft Corporation. All rights reserved. Unauthorized duplication or distribution prohibited. Quiksoft, EasyMail, EasyMail Objects, EasyMail .Net Edition, EasyMail Advanced API, EasyMail SMTP Express, and MailStore are trademarks of Quiksoft Corporation. Other trademarks mentioned are the property of their legal owner.
©2010 Quiksoft Corporation. All rights reserved. Terms of Use, Privacy Statement, Trademarks