TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Matthew Rodwell
NA
46
1.5k
String not working in main part
Aug 13 2020 8:11 AM
In the script below i am working out hte correct email address to send something too. but the srEmail isn't populating in the final part. i think i have set the code up wrongly as it like they don't see each other. I get an error saying it doesn't exist in this content but how do i get round that
thanks
String myOffice = dirEntry.Properties[
"physicalDeliveryOfficeName"
].Value.ToString();
if
(myOffice ==
"Leeds"
)
{
String srEmail =
"
[email protected]
"
;
}
else
if
(myOffice==
"Sheffield"
)
{
String srEmail =
"
[email protected]
"
;
}
else
if
(myOffice ==
"York"
)
{
String srEmail =
"
[email protected]
"
;
}
String Date = DateTime.Now.ToShortDateString();
Outlook.Application app =
new
Outlook.Application();
Outlook.MailItem mailItem = app.CreateItem(Outlook.OlItemType.olMailItem);
mailItem.Subject =
"New Stationary Order - "
+ myName +
":"
+ Date;
mailItem.To = srEmail;
string
htmlString = @"<html>
Reply
Answers (
4
)
Passing data from 2 forms to same textbox c#
Binding picture box with column with oracle