[Mono-bugs] [Bug 651892] New: I have been trying to use the SmtpClient in System.Net.Mail in the MonoTouch Framework.

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sat Nov 6 15:27:31 EDT 2010



           Summary: I have been trying to use the SmtpClient in
                    System.Net.Mail in the MonoTouch Framework.
    Classification: Mono
           Product: MonoTouch
           Version: unspecified
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Critical
          Priority: P5 - None
         Component: Class Libraries
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: warren at it1services.ca
         QAContact: mono-bugs at lists.ximian.com
          Found By: Third Party Developer/Partner
           Blocker: Yes

Description of Problem:
When i try to use the SmtpClient to send emails, if i use the SmtpClient.Send()
method, it just hangs the thread, if i try to use SmtpClient.SendAsync() it
doesn't error out, but never returns on the Async call.  

Steps to reproduce the problem:
<Code Sample>
void SendNotificationEmail(NSData attachment)
            MailMessage mm = new MailMessage();

            mm.To.Add(new MailAddress(Application.NotificationEmail));
            mm.From = new MailAddress("test at gmail.com");

            mm.Bcc.Add(new MailAddress("warren at test.ca"));
            mm.Subject = "Customer Signup CSV Export";
            mm.Body = "Here are the Customers Signed up";
            mm.Attachments.Add(new Attachment(attachment.AsStream(),
            mm.BodyEncoding = UTF8Encoding.UTF8;
            mm.DeliveryNotificationOptions =

            NetworkCredential _Credential = new NetworkCredential("test",

            SmtpClient ss = new SmtpClient("smtp.gmail.com");
            ss.UseDefaultCredentials = false;
            ss.EnableSsl = true;
            ss.Credentials = _Credential;
            ss.Port = 465;
            ss.SendCompleted+= HandleSsSendCompleted;
            object userToken = mm;

            ss.SendAsync(mm, userToken);


        void HandleSsSendCompleted (object sender,
System.ComponentModel.AsyncCompletedEventArgs e)
            if(e.Error != null)
                Util.SuccessfulMessage("Error Occurred");


Actual Results:
HandleSsSendCompleted event never gets called.

Expected Results:
HandleSsSendCompleted event should get called.

How often does this happen? 

Additional Information:
I can be found on #monotouch IRC channel as SuperYeti

Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.

More information about the mono-bugs mailing list