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

C#

 
GeneralRe: MailMessage.AlternateViews ordering Pin
User 47307525-Aug-14 17:07
User 47307525-Aug-14 17:07 
GeneralRe: MailMessage.AlternateViews ordering Pin
Dave Kreskowiak25-Aug-14 17:13
mveDave Kreskowiak25-Aug-14 17:13 
GeneralRe: MailMessage.AlternateViews ordering Pin
User 47307525-Aug-14 17:58
User 47307525-Aug-14 17:58 
GeneralRe: MailMessage.AlternateViews ordering Pin
Dave Kreskowiak25-Aug-14 19:05
mveDave Kreskowiak25-Aug-14 19:05 
QuestionLucene.Net Date Range Search in given indexes Pin
Amol Parsewar25-Aug-14 2:29
Amol Parsewar25-Aug-14 2:29 
QuestionRe: Lucene.Net Date Range Search in given indexes Pin
ZurdoDev25-Aug-14 4:14
professionalZurdoDev25-Aug-14 4:14 
AnswerRe: Lucene.Net Date Range Search in given indexes Pin
Eddy Vluggen25-Aug-14 11:33
professionalEddy Vluggen25-Aug-14 11:33 
Questionsend email to the user once only Pin
Jassim Rahma25-Aug-14 0:04
Jassim Rahma25-Aug-14 0:04 
Hi,

I am using the following code to lop through contracts and send email to concern people. Same contract will have multiple people like a hardware contract should have IT and purchase emails in it. I am able to get the emails but the problem if there are two emails in the contract (john & smith) it will send two emails to john and two emails to smith.

John will receive the email saying Dear John and anther email saying Dear Smith.. similarly with Smith!

here is my code:

C#
while (sql_reader.Read())
{
    contract_id = Convert.ToInt32(sql_reader["contract_id"]);

    mail.To.Add(sql_reader["reminder_email"].ToString());
    mail.Subject = sql_reader["contract_name"].ToString();
    mail.Body = email_body.ToString();

    SmtpServer.Port = 587;
    SmtpServer.Credentials = new System.Net.NetworkCredential("it@mydomain.com", "mypassword");
    SmtpServer.EnableSsl = true;

    SmtpServer.Send(mail);
}



Technology News @ www.JassimRahma.com

AnswerRe: send email to the user once only Pin
OriginalGriff25-Aug-14 0:38
mveOriginalGriff25-Aug-14 0:38 
AnswerRe: send email to the user once only Pin
ZurdoDev25-Aug-14 2:06
professionalZurdoDev25-Aug-14 2:06 
AnswerRe: send email to the user once only Pin
Gerry Schmitz25-Aug-14 10:56
mveGerry Schmitz25-Aug-14 10:56 
QuestionInterview question: What are the 5 classes you use most often? Pin
Bastien Vandamme24-Aug-14 15:38
Bastien Vandamme24-Aug-14 15:38 
AnswerRe: Interview question: What are the 5 classes you use most often? Pin
Wes Aday24-Aug-14 15:52
professionalWes Aday24-Aug-14 15:52 
AnswerRe: Interview question: What are the 5 classes you use most often? Pin
OriginalGriff24-Aug-14 21:39
mveOriginalGriff24-Aug-14 21:39 
AnswerRe: Interview question: What are the 5 classes you use most often? Pin
Eddy Vluggen24-Aug-14 22:02
professionalEddy Vluggen24-Aug-14 22:02 
GeneralRe: Interview question: What are the 5 classes you use most often? Pin
Bastien Vandamme24-Aug-14 22:09
Bastien Vandamme24-Aug-14 22:09 
GeneralRe: Interview question: What are the 5 classes you use most often? Pin
OriginalGriff24-Aug-14 22:48
mveOriginalGriff24-Aug-14 22:48 
GeneralRe: Interview question: What are the 5 classes you use most often? Pin
OriginalGriff24-Aug-14 23:18
mveOriginalGriff24-Aug-14 23:18 
GeneralRe: Interview question: What are the 5 classes you use most often? Pin
Rob Philpott24-Aug-14 23:05
Rob Philpott24-Aug-14 23:05 
GeneralRe: Interview question: What are the 5 classes you use most often? Pin
Eddy Vluggen25-Aug-14 3:02
professionalEddy Vluggen25-Aug-14 3:02 
GeneralRe: Interview question: What are the 5 classes you use most often? Pin
jschell25-Aug-14 10:34
jschell25-Aug-14 10:34 
GeneralRe: Interview question: What are the 5 classes you use most often? Pin
Eddy Vluggen25-Aug-14 11:22
professionalEddy Vluggen25-Aug-14 11:22 
AnswerRe: Interview question: What are the 5 classes you use most often? Pin
Pete O'Hanlon24-Aug-14 23:08
mvePete O'Hanlon24-Aug-14 23:08 
GeneralRe: Interview question: What are the 5 classes you use most often? Pin
Bastien Vandamme24-Aug-14 23:34
Bastien Vandamme24-Aug-14 23:34 
AnswerRe: Interview question: What are the 5 classes you use most often? Pin
Joe Woodbury25-Aug-14 9:34
professionalJoe Woodbury25-Aug-14 9:34 

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.