Click here to Skip to main content
15,887,175 members
Home / Discussions / C#
   

C#

 
GeneralTrying to Access Managed C# Interface from Non Managed C++ Extended Stored Proc Pin
acote@postech.ca19-Sep-03 6:34
acote@postech.ca19-Sep-03 6:34 
GeneralC# Photo Album Viewer - Need help, will pay. Pin
Joel Briggs19-Sep-03 6:09
Joel Briggs19-Sep-03 6:09 
GeneralRe: C# Photo Album Viewer - Need help, will pay. Pin
fadee20-Sep-03 1:37
fadee20-Sep-03 1:37 
GeneralResourceManager.GetString() unsafe Pin
berndg19-Sep-03 5:25
berndg19-Sep-03 5:25 
GeneralParent form / child form docking problems Pin
Member 54950419-Sep-03 4:37
Member 54950419-Sep-03 4:37 
Generalurgent help!! how to create form like project property page of CSharp project in a solution Pin
Maggiem19-Sep-03 4:12
Maggiem19-Sep-03 4:12 
GeneralRe: urgent help!! how to create form like project property page of CSharp project in a solution Pin
leppie19-Sep-03 7:08
leppie19-Sep-03 7:08 
GeneralHelp with Outlook Global Address List!!!! Pin
frank2119-Sep-03 3:39
frank2119-Sep-03 3:39 
I am writing a C# application that uses an SMTP server to send out emails. I have it sending correctly now I am ready to take the next step. I want to be able to read the global address list into a structure such as an array and parse the array and send email to the corresponding email address in that array location. I am new at C#, and I would really appreciate it if someone could write me up a small example app or equivalent item. Thanks so much you guys are lifesavers!



My Code so far:


using System;
using System.Windows.Forms;
using System.Data;
using System.Web;
using System.Drawing;
using System.ComponentModel;
using System.Web.Mail;

class E_Mail
{

public static void SendEmail(string To, string From, string
Subject, string Body, System.Web.Mail.MailFormat Format)
{
System.Web.Mail.MailMessage Mailer = new
System.Web.Mail.MailMessage();
Mailer.From = From;
Mailer.To = To;
Mailer.Subject = Subject;
Mailer.Body = Body;
Mailer.BodyFormat = Format;

Console.Write(". ");
System.Web.Mail.SmtpMail.SmtpServer= "xxx@xxx.com";

Console.Write(". ");
System.Web.Mail.SmtpMail.Send(Mailer);
MessageBox.Show("Message sent successfully!","Message Delivered",
MessageBoxButtons.OK,MessageBoxIcon.Asterisk);
}

public static void Main()
{
Console.Write("Working ");
try
{
SendEmail("xxx@xxx.com", "Frank","Test E-Mail",
"Hello to all...",System.Web.Mail.MailFormat.Text);
} // end try
catch (HttpException)
{
MessageBox.Show("Could not connect to server!","Error",
MessageBoxButtons.OK, MessageBoxIcon.Error);
} // end catch
Console.Write("\n");
}
}


Confused | :confused:
GeneralDataGrid binding. Pin
kalla12319-Sep-03 2:26
kalla12319-Sep-03 2:26 
GeneralRe: DataGrid binding. Pin
Mazdak19-Sep-03 6:48
Mazdak19-Sep-03 6:48 
GeneralRe: DataGrid binding. Pin
Jim MacDonald19-Sep-03 9:44
Jim MacDonald19-Sep-03 9:44 
GeneralRe: DataGrid binding. Pin
kalla12319-Sep-03 10:01
kalla12319-Sep-03 10:01 
Generaltabcontrol Pin
brain2cpu18-Sep-03 23:49
professionalbrain2cpu18-Sep-03 23:49 
GeneralRe: tabcontrol Pin
NetPointerIN19-Sep-03 7:47
NetPointerIN19-Sep-03 7:47 
GeneralRe: tabcontrol Pin
brain2cpu23-Sep-03 20:08
professionalbrain2cpu23-Sep-03 20:08 
Generalmp3 calculations Pin
Uncle Monkey18-Sep-03 23:29
Uncle Monkey18-Sep-03 23:29 
GeneralRe: mp3 calculations Pin
Julian Bucknall [MSFT]19-Sep-03 6:33
Julian Bucknall [MSFT]19-Sep-03 6:33 
GeneralRe: mp3 calculations Pin
Uncle Monkey21-Sep-03 22:31
Uncle Monkey21-Sep-03 22:31 
GeneralRe: mp3 calculations Pin
Julian Bucknall [MSFT]22-Sep-03 5:25
Julian Bucknall [MSFT]22-Sep-03 5:25 
GeneralRe: mp3 calculations Pin
Uncle Monkey22-Sep-03 5:32
Uncle Monkey22-Sep-03 5:32 
Generali want to run the sqlserver agent server Pin
meetweb18-Sep-03 20:07
meetweb18-Sep-03 20:07 
GeneralProblem in accessing an unmanaged dll Pin
Rashi_Ajay18-Sep-03 19:34
Rashi_Ajay18-Sep-03 19:34 
GeneralHELP - Following XML Element Heirarchy Pin
Anonymous18-Sep-03 19:00
Anonymous18-Sep-03 19:00 
GeneralRight Click on the internet explorer Pin
Srikar Y18-Sep-03 17:58
Srikar Y18-Sep-03 17:58 
GeneralRe: Right Click on the internet explorer Pin
Blake Coverett20-Sep-03 15:44
Blake Coverett20-Sep-03 15:44 

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.