Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB.NET 1.0 > Pro VB.NET 2002/2003
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Pro VB.NET 2002/2003 For advanced Visual Basic coders working .NET version 2002/2003. Beginning-level questions will be redirected to other forums, including Beginning VB.NET.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB.NET 2002/2003 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 16th, 2004, 08:50 PM
Authorized User
 
Join Date: Jul 2003
Location: KL, WP, Malaysia.
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to hplim18
Default Sending Email from VB.NET not using outlook

Creating mail and sending mail using outlook is common thing in VB.NET. Does anyone know other ways of sending e-mail by not using outlook?

For example that i can create my own component to create and sending mail to the users.

Jeannie....
__________________
Jeannie....
Reply With Quote
  #2 (permalink)  
Old May 17th, 2004, 03:11 AM
Authorized User
 
Join Date: Jun 2003
Location: Norfolk, , United Kingdom.
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi

Have a look at system.web.mail, the code extract is a console app

I know this is in c# but will easliy translate to VB
using System;
using System.Web.Mail;

namespace WebMail {
    class Class1 {
        static void Main(string[] args) {
            try {
                MailMessage oMsg = new MailMessage();
                // TODO: Replace with sender e-mail address.
                oMsg.From = "<insert email address>";
                // TODO: Replace with recipient e-mail address.
                oMsg.To = "<insert email address>";
                oMsg.Subject = "Send Using Web Mail";

                // SEND IN HTML FORMAT (comment this line to send plain text).
                oMsg.BodyFormat = MailFormat.Html;

                // HTML Body (remove HTML tags for plain text).
                oMsg.Body = "<HTML><BODY><B>Hello World!</B></BODY></HTML>";

                // ADD AN ATTACHMENT.
                // TODO: Replace with path to attachment.
                String sFile = @"C:\temp\test.doc";
                MailAttachment oAttch = new MailAttachment(sFile, MailEncoding.Base64);

                oMsg.Attachments.Add(oAttch);

                // TODO: Replace with the name of your remote SMTP server.
                SmtpMail.SmtpServer = "<insert smtp adddress>";
                SmtpMail.Send(oMsg);

                oMsg = null;
                oAttch = null;
            }
            catch (Exception e) {
                Console.WriteLine("{0} Exception caught.", e);
            }
        }
    }
}


Duncan
Reply With Quote
  #3 (permalink)  
Old November 23rd, 2008, 04:38 AM
hu_yang
Guest
 
Posts: n/a
Default

go through the following link , it will show hot to send SMTP eamil.

http://vb.net-informations.com/commu..._smtp_mail.htm

yang

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sending email in VB.net lowell .NET Framework 2.0 3 November 30th, 2008 11:51 AM
Problem sending email with SMTP in VB.Net Compiler Forum and Wrox.com Feedback 3 November 30th, 2007 07:25 PM
sending an email from a vb.net app badgolfer VB.NET 2002/2003 Basics 1 March 7th, 2005 09:27 PM
Sending email thru Outlook Exp. from VB with html rambhias Beginning VB 6 4 November 22nd, 2004 03:12 AM
Sending an email without Outlook SaharaWizard Pro VB 6 3 August 12th, 2004 04:15 PM



All times are GMT -4. The time now is 04:21 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.