Sending Email
Sending Email
Sending Email
Sending Email
Sending Email
Sending Email Sending Email Sending Email Sending Email Sending Email Sending Email Sending Email Sending Email
Sending Email Sending Email
Sending Email
Go Back  Xtreme Visual Basic Talk > > > Sending Email


Reply
 
Thread Tools Display Modes
  #1  
Old 12-28-2003, 11:36 AM
teha teha is offline
Newcomer
 
Join Date: Dec 2003
Posts: 4
Default Sending Email


hi there i am currently trying to develop a system that can send email using VB.NET does anyone knows where to find some sample coding in how to do it or is there anyone who knows how to do it and can show me how and best is to able to send to hotmail and yahoo thanks
Reply With Quote
  #2  
Old 12-28-2003, 03:30 PM
reboot's Avatar
rebootSending Email reboot is offline
Keeper of foo

Retired Moderator
* Guru *
 
Join Date: Nov 2001
Location: Graceland
Posts: 15,614
Default

Very simple example:
Code:
Imports System.Web.Mail Dim mailMsg As New MailMessage() With mailMsg .From = "joe@foo.com" .To = "jack@bar.net" .Cc = "jane@godotnet.com" .Bcc = "jill@godotnet.com" .Subject = "Hello from .Net" .Body = "This is the body of the message." End With SmtpMail.SmtpServer = "127.0.0.1" 'can use "smarthost" if you're using exchange SmtpMail.Send(mailMsg)
Reply With Quote
  #3  
Old 12-29-2003, 12:23 AM
teha teha is offline
Newcomer
 
Join Date: Dec 2003
Posts: 4
Default still cannot

hi there i tried using the coding you gave me but then i got this error i wonder why ?


An unhandled exception of type 'System.Web.HttpException' occurred in system.web.dll

Additional information: Could not access 'CDO.Message' object.

hope you can help me out
Reply With Quote
  #4  
Old 12-29-2003, 02:44 AM
Optikal's Avatar
OptikalSending Email Optikal is offline
Codeaholic

Retired Leader
* Guru *
 
Join Date: Oct 2002
Location: Winnipeg, MB, Canada
Posts: 4,543
Default

What OS are you running it under. I believe CDO only comes with Win2k and up, but you might be able to download and install a version for Win98/NT.
__________________
There are 10 types of people in this world, those that understand binary, and those that don't.
Reply With Quote
  #5  
Old 12-29-2003, 05:25 AM
teha teha is offline
Newcomer
 
Join Date: Dec 2003
Posts: 4
Default

I am using windows XP right now will it be a problem?
Reply With Quote
  #6  
Old 01-13-2004, 01:16 AM
pinster's Avatar
pinster pinster is offline
Contributor
 
Join Date: Jan 2002
Location: Penang, Malaysia
Posts: 508
Default

CDONTs doesn't exists in Windows XP. You may want to search the web and download the dll file and register to windows registry.
__________________
Nothing is impossible in Programming! So, take it easy and let us all share your problem. :)
Reply With Quote
  #7  
Old 01-13-2004, 09:01 AM
reboot's Avatar
rebootSending Email reboot is offline
Keeper of foo

Retired Moderator
* Guru *
 
Join Date: Nov 2001
Location: Graceland
Posts: 15,614
Default

Did you substitute your actual SMTP server where i had

SmtpMail.SmtpServer = "127.0.0.1"

?
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sending an record via email from a Form twilightprotege Database and Reporting 6 09-25-2003 05:26 AM
question about sending email with VB BryanMiller Communications 3 09-01-2003 10:32 AM
Sending email from MS Access Merlin Sythove Word, PowerPoint, Outlook, and Other Office Products 8 05-08-2003 03:19 AM
Sending an Email using variables returned from a text file db search Jack_Ruby Database and Reporting 4 12-18-2002 08:39 PM

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Sending Email
Sending Email
Sending Email Sending Email
Sending Email
Sending Email
Sending Email Sending Email Sending Email Sending Email Sending Email Sending Email Sending Email
Sending Email
Sending Email
 
Sending Email
Sending Email
 
-->