Encerrado

C# To Create Outlook Draft

I am wanting to create ONE email for each row in my datatable where the month = current month. My code was working until I added in the conditional statement for manager name. If I comment that out and execute, it works as expected. How should I add the conditional for manager name to set the subject and body so that only ONE emaill is created?

static void CreateEmails ()

{

string subject;

string body;

Application oApp = new Application();

foreach (DataRow r in [login to view URL])

{

if (r["month"].ToString() != [login to view URL]("MMMM"))

continue;

if (r["manager"].ToString() == "James")

{

subject = subjectJames;

body = bodyJames;

}

else

{

subject = subjectStandard;

body = bodyStandard;

}

MailItem oMsg = (MailItem)[login to view URL]([login to view URL]);

[login to view URL] = body;

[login to view URL] = subject;

var emailAddress = [login to view URL]<string>("Email").Split(';');

foreach (var email in emailAddress)

[login to view URL](email);

[login to view URL]();

[login to view URL]();

}

}

Habilidades: .NET, Programação C#, Arquitetura de software

Veja mais: vbnet 2005 create outlook email save, vba create text file save subject outlook, how to create a website c#, outlook item events, c# send email from outlook account, outlook.mailitem c#, sending outlook mail using c#, c# create outlook email with attachment, outlook mailitem methods, c# outlook add attachment, outlook c# plugin, i created a website i want to create a home page for that website, i want to create and save logo for free, i want to create my own logo and save it for free, who created waptrick and how to create website like wapyrick, program in c to create, geospecial object identification or analysis ? I am looking for someone to create a model for scoring density of tree and bush c, I\ m starting a construction company and I would like to create a logo for The Company name is C&A , and it has a saying : empre, Write an interactive program in C language to create an application program for your study centre. This application should be ha, Webcam Program in C# to show and save image

Acerca do Empregador:
( 0 comentários ) Athens, United States

ID do Projeto: #18960947

15 freelancers estão ofertando em média $26 para esse trabalho

smartstepsco

Hi I'm c# developer with 12 years experience on .net framework and related tools, I'll fix your code to send a correct email. please send me a message to discuss more about it.

$45 USD em 1 dia
(31 Comentários)
5.8
$25 USD em 1 dia
(35 Comentários)
5.1
shobhitpundir

Hi There, I understand the problem. Once of the reason why your condition is failing is data. You are comparing string with no case sensitiveness. Here is the update code, see if helps or connect over chat to discu Mais

$25 USD em 1 dia
(12 Comentários)
4.9
vinodseta1991

Hello Dear, I have 4+ Year of experience and have complete your [login to view URL] we can set your manager level subject And body. looking forward working with you. Thanks

$30 USD in 2 dias
(3 Comentários)
3.8
farhadakram

Hi, I have read the project details and attached Code very carefully and I think I have understood that what is the problem. I have experience in C# Programming and I have completed many C#projects throughout my caree Mais

$30 USD in 0 dias
(15 Comentários)
3.8
kusal77

This is very easy fix with my experience I am a Dedicated Senior .Net Developer and Database Administrator with 20 years of experience in Web/ Windows and Android Developments,Administration, Project Management Mais

$17 USD em 1 dia
(7 Comentários)
3.7
dataEntryExperty

I will solve this issue ASAP. Yes sir I read the instructions. I am best for the job. Already working on similar projects. Please contact me on chat.

$30 USD em 1 dia
(13 Comentários)
2.6
akshaykumavat69

I am .NET developer. I have good hands-on experience more than 4 yrs in asp.net web and windows application developement. I have my own workstation setup with Visual Studio 2017 and MS SQl server. So we will just disc Mais

$25 USD em 1 dia
(5 Comentários)
2.6
prerak121

Hi, i am excited to work on this project. i will finish this work in 1 day. i am web developer and having 3 years of experience. Please give me an opportunity. thanks.

$18 USD em 1 dia
(5 Comentários)
1.9
jahid68582

Dear sir, thanking to you.i read your instructions this project.i have an experience in this field more than two [login to view URL] i think i am fit for your job.

$30 USD em 1 dia
(0 Comentários)
0.0
UndhadAshwin

I have 11-year work experience in asp.net(Web and Windows Application). I am hard-working and responsible person. I have good knowledge of Working in professional environment. I have confidence in my web abilities, Mais

$15 USD in 2 dias
(0 Comentários)
0.0
minaljunction1

Just to introduce myself, I am a .NET full stack developer with 9.5 years of development experience in an MNC.

$30 USD em 1 dia
(0 Comentários)
0.0
$25 USD em 1 dia
(0 Comentários)
0.0
hieunvhust

I am a project leader in VietNam with more 3 years experiences. My Skills: - JAVA, Spring - .NET, ASP.NET - Xamarin - Database - ERP Inbox me!

$15 USD in 3 dias
(0 Comentários)
0.0
habibaiqbal247

I done my job with [login to view URL] me chance and I gave u my best.

$25 USD in 30 dias
(0 Comentários)
0.0