Click here to Skip to main content
15,915,869 members
Home / Discussions / C#
   

C#

 
GeneralRe: building a canned email sender Pin
fadee22-Sep-03 20:43
fadee22-Sep-03 20:43 
I can't get what you mean by canned mail... anyway, MAPI is no longer our darling... to send an email... follow following steps...

Add reference of System.Web into your project... and do following in code...

<br />
using System.Web.Mail;<br />
.......<br />
.......<br />
.......<br />
.......<br />
.......<br />
MailMessage mail = New MailMessage()<br />
<br />
mail.To = ToMail;<br />
mail.From = FromMail;<br />
mail.Subject = Subject;<br />
mail.Body = Msg;<br />
<br />
SmtpMail.SmtpServer = "localhost";<br />
<br />
try<br />
{<br />
      SmtpMail.Send(mail)<br />
      Return true;<br />
<br />
} Catch ex As Exception<br />
{<br />
      Return false;<br />
}<br />


Explore more... you can send attachments and blah blah with it too..

Good Day; <wish me="" one="" too="" coz="" need="" today="" Cry | :(( ="">
mE

---------------------
A gasp of breath,
A sudden death:
The tale begun.

A rustled page
Passes an age:
The tale is done.
GeneralObjectStreams in .NET Pin
Anonymous22-Sep-03 13:18
Anonymous22-Sep-03 13:18 
GeneralRe: ObjectStreams in .NET Pin
J. Dunlap22-Sep-03 15:38
J. Dunlap22-Sep-03 15:38 
GeneralRe: From MFC to C# Serialization Pin
J. Dunlap22-Sep-03 10:54
J. Dunlap22-Sep-03 10:54 
GeneralBinding on Tab Controls Pin
Wjousts22-Sep-03 9:35
Wjousts22-Sep-03 9:35 
GeneralRe: Binding on Tab Controls Pin
Wjousts23-Sep-03 4:24
Wjousts23-Sep-03 4:24 
GeneralValidating a windows form Pin
Wjousts22-Sep-03 7:44
Wjousts22-Sep-03 7:44 
Generalcall unmanaged ActiveX method from C# Pin
rishikt22-Sep-03 6:16
rishikt22-Sep-03 6:16 
GeneralAccessing datasets on form Pin
phimix22-Sep-03 6:10
phimix22-Sep-03 6:10 
GeneralRe: Accessing datasets on form Pin
Mike Osbahr22-Sep-03 7:26
Mike Osbahr22-Sep-03 7:26 
GeneralRe: Accessing datasets on form Pin
phimix22-Sep-03 19:26
phimix22-Sep-03 19:26 
GeneralMultithreaded Apps Pin
Ricardo Moncada22-Sep-03 6:04
Ricardo Moncada22-Sep-03 6:04 
GeneralRe: Multithreaded Apps Pin
scadaguy22-Sep-03 8:11
scadaguy22-Sep-03 8:11 
GeneralRe: Multithreaded Apps Pin
Ricardo Moncada22-Sep-03 10:27
Ricardo Moncada22-Sep-03 10:27 
GeneralFreeze form when it removing and reloading ctls Pin
Chris#22-Sep-03 5:57
Chris#22-Sep-03 5:57 
GeneralRe: Freeze form when it removing and reloading ctls Pin
Julian Bucknall [MSFT]22-Sep-03 7:03
Julian Bucknall [MSFT]22-Sep-03 7:03 
GeneralMS Word programming in C#. Pin
bimpy22-Sep-03 5:25
bimpy22-Sep-03 5:25 
GeneralC# switch case style Pin
Don Kackman22-Sep-03 5:24
Don Kackman22-Sep-03 5:24 
GeneralRe: C# switch case style Pin
Julian Bucknall [MSFT]22-Sep-03 7:14
Julian Bucknall [MSFT]22-Sep-03 7:14 
GeneralRe: C# switch case style Pin
Don Kackman22-Sep-03 8:39
Don Kackman22-Sep-03 8:39 
GeneralRe: C# switch case style Pin
Julian Bucknall [MSFT]22-Sep-03 10:05
Julian Bucknall [MSFT]22-Sep-03 10:05 
GeneralRe: C# switch case style Pin
Don Kackman22-Sep-03 10:18
Don Kackman22-Sep-03 10:18 
GeneralSmoothing as in MSVisio2002 Pin
Wizard_0122-Sep-03 3:54
Wizard_0122-Sep-03 3:54 
GeneralIE and .NET question Pin
yoaz22-Sep-03 2:34
yoaz22-Sep-03 2:34 
GeneralVisual Studion.Net 2002 closes by itself any time I try loading a C# project Pin
okoji Cyril22-Sep-03 1:20
okoji Cyril22-Sep-03 1:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.