Email with attachment functionality in windows phone 8

Jul 24, 2013 at 8:26 AM
Edited Jul 24, 2013 at 3:29 PM

we have downloaded the "WP7Mail" dll and used in my code.
we have prepared Mailmessage and we are trying to send the mail with attachment using SmtpClient which already provided in "WP7Mail" dll.
we are trying to send the mail like below

WP7Mail.Net.MailMessage Mmessage = new WP7Mail.Net.MailMessage("User name", "Mail Id", "Mail ID", "testing subject");
Mmessage.AddAttachment(Imagebyetes, "Sample image", "image/png");
Mmessage.AddMessageContent("sample description");
SmtpClient client = new SmtpClient();

but we are getting error at this line "client.SendMail(Mmessage)"
Error is: object refernce not set to instance of an object.

here we are not able to connect SmtpClient.Authenticate(usermail,authValue);
Error: Client not connected.

please suggest us