Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
kali  
#1 Posted : Tuesday, August 20, 2013 3:37:37 AM(UTC)
kali

Rank: Newbie

Groups: Registered
Joined: 8/20/2013(UTC)
Posts: 0
India
Location: bangalore

i display the mail.from but i cannot display mail.to in c#.please help me how to recieve this mail.to.
code:-
Mail oMail = oClient.GetMail(info);
MessageBox.Show(oMail.ReplyTo.ToString());
ivan  
#2 Posted : Tuesday, August 20, 2013 4:19:34 AM(UTC)
ivan

Rank: Administration

Groups: Administrators
Joined: 11/11/2010(UTC)
Posts: 1,153

Thanks: 9 times
Was thanked: 55 time(s) in 55 post(s)
Originally Posted by: kali Go to Quoted Post
i display the mail.from but i cannot display mail.to in c#.please help me how to recieve this mail.to.
code:-
Mail oMail = oClient.GetMail(info);
MessageBox.Show(oMail.ReplyTo.ToString());


Hi, To is a MailAddress array, one email may contains multiple to addresses:

so please use the following codes:

            // Parse Mail To, Recipient
MailAddress[] addrs = oMail.To;
for (int i = 0; i < addrs.Length; i++)
{
MessageBox.Show("To: {0}", addrs[i].ToString());
}
kali  
#3 Posted : Tuesday, August 20, 2013 4:48:42 AM(UTC)
kali

Rank: Newbie

Groups: Registered
Joined: 8/20/2013(UTC)
Posts: 0
India
Location: bangalore

TempToEmployeeEmailID = oMail.To[0].ToString();
ivan  
#4 Posted : Tuesday, August 20, 2013 5:00:21 AM(UTC)
ivan

Rank: Administration

Groups: Administrators
Joined: 11/11/2010(UTC)
Posts: 1,153

Thanks: 9 times
Was thanked: 55 time(s) in 55 post(s)
Originally Posted by: kali Go to Quoted Post
TempToEmployeeEmailID = oMail.To[0].ToString();



Some emails doesn't contain To recipients, so before you use
TempToEmployeeEmailID = oMail.To[0].ToString();

please make sure oMail.To.Length > 0
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.055 seconds.

EXPLORE TUTORIALS

© All Rights Reserved, AIFEI Software Limited & AdminSystem Software Limited.