473,320 Members | 1,961 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Sending Mail via SMTP

Hey group,

Could anybody point me in the right direction for some hows to`s on how to
send e-mail from VB?

Basically want a form with 3 x textbox's on 1 for From, 1 for subject, and 1
for message.

Many Thanks
MCN
Nov 20 '05 #1
10 991
Hi,

http://support.microsoft.com/default...b;en-us;313773

Ken
--------------
"MadCrazyNewbie" <te**@nospam.com> wrote in message
news:We********************@karoo.co.uk...
Hey group,

Could anybody point me in the right direction for some hows to`s on how to
send e-mail from VB?

Basically want a form with 3 x textbox's on 1 for From, 1 for subject, and
1
for message.

Many Thanks
MCN

Nov 20 '05 #2
* "MadCrazyNewbie" <te**@nospam.com> scripsit:
Could anybody point me in the right direction for some hows to`s on how to
send e-mail from VB?

Basically want a form with 3 x textbox's on 1 for From, 1 for subject, and 1
for message.


My FAQ:

Namespace 'System.Web.Mail' (requires reference to "System.Web.dll"),
FAQ: <URL:http://www.systemwebmail.net/>.

CDO/Exchange:

Support Policy for Microsoft Exchange APIs with .NET Framework Applications
<URL:http://support.microsoft.com/?scid=kb;EN-US;813349>

HOW TO: Retrieve Messages Using CDOEX and ADO in Visual C#
<URL:http://support.microsoft.com/?scid=kb;EN-US;310206>

Self-made:

<URL:http://www.codeproject.com/csharp/karavaev_denis.asp>
<URL:http://www.codeproject.com/csharp/popapp.asp>
<URL:http://www.codeproject.com/csharp/pop3client.asp>

SMTP and POP3 Mail Server
<URL:http://www.codeproject.com/csharp/smtppop3mailserver.asp>

Commercial:

<URL:http://www.abderaware.com/mail/>

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #3
Hi

this will get you started:

at the top of your project
Imports System.Web.Mail

then the code behind for example a button

try
SmtpMail.SmtpServer = "XXX.XXX.XXX.XXX" IP of an smtp server
Dim Message As MailMessage
Message = New MailMessage()
Message.From = txtFrom.text
Message.To = txtTo.Text
Message.Cc = txtcc.Text
Message.Subject = txtSubject.Text
Message.Body = txtMail.Text
Message.BodyFormat = MailFormat.Text
SmtpMail.Send(Message)
catch ex as exception
msgbox(ex.tostring)
end try

You can also attacht files but for the moment I haven't got time to
give you that code, but looking for that yourself won't hurt you.

HTH
Gr Peter

"MadCrazyNewbie" <te**@nospam.com> wrote in message news:<We********************@karoo.co.uk>...
Hey group,

Could anybody point me in the right direction for some hows to`s on how to
send e-mail from VB?

Basically want a form with 3 x textbox's on 1 for From, 1 for subject, and 1
for message.

Many Thanks
MCN

Nov 20 '05 #4
Piedro, spot on exatly what I was after.

Many Thanks
MCN

"Piedro" <pp*****@hotmail.com> wrote in message
news:b7*************************@posting.google.co m...
Hi

this will get you started:

at the top of your project
Imports System.Web.Mail

then the code behind for example a button

try
SmtpMail.SmtpServer = "XXX.XXX.XXX.XXX" IP of an smtp server
Dim Message As MailMessage
Message = New MailMessage()
Message.From = txtFrom.text
Message.To = txtTo.Text
Message.Cc = txtcc.Text
Message.Subject = txtSubject.Text
Message.Body = txtMail.Text
Message.BodyFormat = MailFormat.Text
SmtpMail.Send(Message)
catch ex as exception
msgbox(ex.tostring)
end try

You can also attacht files but for the moment I haven't got time to
give you that code, but looking for that yourself won't hurt you.

HTH
Gr Peter

"MadCrazyNewbie" <te**@nospam.com> wrote in message

news:<We********************@karoo.co.uk>...
Hey group,

Could anybody point me in the right direction for some hows to`s on how to send e-mail from VB?

Basically want a form with 3 x textbox's on 1 for From, 1 for subject, and 1 for message.

Many Thanks
MCN

Nov 20 '05 #5
Liz

"Piedro" <pp*****@hotmail.com> wrote in message
news:b7*************************@posting.google.co m...
Imports System.Web.Mail try
SmtpMail.SmtpServer = "XXX.XXX.XXX.XXX" IP of an smtp server
Dim Message As MailMessage
Message = New MailMessage()
Message.From = txtFrom.text
Message.To = txtTo.Text
Message.Cc = txtcc.Text
Message.Subject = txtSubject.Text
Message.Body = txtMail.Text
Message.BodyFormat = MailFormat.Text
SmtpMail.Send(Message)
catch ex as exception
msgbox(ex.tostring)
end try


anyone know how you can do this with authentication ?

Nov 20 '05 #6
"Liz" <li*@tiredofspam.com> wrote in message news:<#r**************@TK2MSFTNGP12.phx.gbl>...
"Piedro" <pp*****@hotmail.com> wrote in message
news:b7*************************@posting.google.co m...
Imports System.Web.Mail

try
SmtpMail.SmtpServer = "XXX.XXX.XXX.XXX" IP of an smtp server
Dim Message As MailMessage
Message = New MailMessage()
Message.From = txtFrom.text
Message.To = txtTo.Text
Message.Cc = txtcc.Text
Message.Subject = txtSubject.Text
Message.Body = txtMail.Text
Message.BodyFormat = MailFormat.Text
SmtpMail.Send(Message)
catch ex as exception
msgbox(ex.tostring)
end try


anyone know how you can do this with authentication ?


Hi Liz,

look at the Herfieds' FAQ, everything is explained there perfectly.

http://www.systemwebmail.net/faq/3.8.aspx

Gr Peter
Nov 20 '05 #7
Liz

"Piedro" <pp*****@hotmail.com> wrote in message
news:b7**************************@posting.google.c om...
"Liz" <li*@tiredofspam.com> wrote in message

news:<#r**************@TK2MSFTNGP12.phx.gbl>...
Imports System.Web.Mail

try
SmtpMail.SmtpServer = "XXX.XXX.XXX.XXX" IP of an smtp server
Dim Message As MailMessage
Message = New MailMessage()
Message.From = txtFrom.text
Message.To = txtTo.Text
Message.Cc = txtcc.Text
Message.Subject = txtSubject.Text
Message.Body = txtMail.Text
Message.BodyFormat = MailFormat.Text
SmtpMail.Send(Message)
catch ex as exception
msgbox(ex.tostring)
end try


anyone know how you can do this with authentication ?


Hi Liz,

look at the Herfieds' FAQ, everything is explained there perfectly.

http://www.systemwebmail.net/faq/3.8.aspx


great FAQ ... and now my code works ! thanks ..


Nov 20 '05 #8
Sorry for the typo Herfried

:-)

pp*****@hotmail.com (Piedro) wrote in message news:<b7**************************@posting.google. com>...
"Liz" <li*@tiredofspam.com> wrote in message news:<#r**************@TK2MSFTNGP12.phx.gbl>...
"Piedro" <pp*****@hotmail.com> wrote in message
news:b7*************************@posting.google.co m...
Imports System.Web.Mail try
SmtpMail.SmtpServer = "XXX.XXX.XXX.XXX" IP of an smtp server
Dim Message As MailMessage
Message = New MailMessage()
Message.From = txtFrom.text
Message.To = txtTo.Text
Message.Cc = txtcc.Text
Message.Subject = txtSubject.Text
Message.Body = txtMail.Text
Message.BodyFormat = MailFormat.Text
SmtpMail.Send(Message)
catch ex as exception
msgbox(ex.tostring)
end try


anyone know how you can do this with authentication ?


Hi Liz,

look at the Herfieds' FAQ, everything is explained there perfectly.

http://www.systemwebmail.net/faq/3.8.aspx

Gr Peter

Nov 20 '05 #9
* pp*****@hotmail.com (Piedro) scripsit:
look at the Herfieds' FAQ, everything is explained there perfectly.

http://www.systemwebmail.net/faq/3.8.aspx


It's actually /not/ my FAQ ;-).

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #10
hi***************@gmx.at (Herfried K. Wagner [MVP]) wrote in message news:<2g***********@uni-berlin.de>...
* pp*****@hotmail.com (Piedro) scripsit:
look at the Herfieds' FAQ, everything is explained there perfectly.

http://www.systemwebmail.net/faq/3.8.aspx


It's actually /not/ my FAQ ;-).

I didn't say it was your FAQ, I said it was Herfieds' FAQ lol ;-)
Now I'm going to work

gr Peter
Nov 20 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: Sven Templin | last post by:
Hello all, our configuration is as following described: - OS: Windows 2000 - Apache server 1.3 - Php 3.8 - MS outlook client 2000 _and_ no SMTP server available in the whole intranet.
6
by: Owen | last post by:
I am sending email using CDO but it only seems to work when the "To" address is within the same domain as mine. When I send to an outside domain (eg. yahoo.com) the mail simply does not reach...
9
by: B-Dog | last post by:
I've built a small app that sends mail through our ISP's SMTP server but when I try to send through my local exchange server I get CDO error. Does webmail use SMTP or does it strictly rely on...
1
by: Eric Sheu | last post by:
Greetings, I have been searching the web like mad for a solution to my SMTP problem. I am using Windows Server 2003 and ASP.NET 2.0 w/ C# to send out e-mails from a web site I have created to...
3
by: armando perez | last post by:
Hi, this is my first time here, but I was looking for something that may help me, and still, I haven't found something to use. I'm using a website made in .NET with C#, when I'm running my site...
8
by: Robert Dufour | last post by:
Dim message As New MailMessage("mymail@mydomain.com", "mymail@mydomain.com", "Test", "Test") Dim emailClient As New SmtpClient("localhost") emailClient.Send(message) The IIS server is...
1
rsrinivasan
by: rsrinivasan | last post by:
Hi, I am Sending mail from java. When I run the program I hava Following error.. DEBUG: setDebug: JavaMail version 1.4ea DEBUG: getProvider() returning javax.mail.Provider DEBUG SMTP:...
2
by: =?Utf-8?B?QWRl?= | last post by:
HI All, I am encountering the following error when I try to send an email through a SMTP server. I believe the problem lies with the authentication part when the network crednetials are used,...
4
by: =?Utf-8?B?R3V5IENvaGVu?= | last post by:
Hi all I use: Dim message As New MailMessage(txtTo.Text, txtFrom.Text, txtSubject.Text, txtBody.Text) Dim emailClient As New SmtpClient(txtSMTPServer.Text) emailClient.Send(message) And its...
31
by: happyse27 | last post by:
Hi All, I am trying for weeks how to send email from windows pc, which from my gmail account to my hotmail account. Using net::smtp module sending email failed,Kindly assist. (for the item d it...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.