Bug 19874 - System.Net.Mail.SmtpClient.SendMailAsync doesn't exist
Summary: System.Net.Mail.SmtpClient.SendMailAsync doesn't exist
Status: RESOLVED FIXED
Alias: None
Product: Class Libraries
Classification: Mono
Component: System ()
Version: master
Hardware: PC Mac OS
: Normal normal
Target Milestone: Untriaged
Assignee: Marek Safar
URL:
Depends on:
Blocks:
 
Reported: 2014-05-18 06:25 UTC by henrik
Modified: 2014-05-23 15:43 UTC (History)
5 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description henrik 2014-05-18 06:25:06 UTC
open System
open System.Net.Mail

let send (client : SmtpClient) (timeout : TimeSpan) email =
  client.Timeout <- int timeout.TotalMilliseconds
  client.SendMailAsync email |> Async.AwaitTask

error FS0039: The field, constructor or member 'SendMailAsync' is not defined
Comment 1 Shruti 2014-05-19 07:47:02 UTC
Steps to Reproduce :

1. Create a new C# Console project.
2. Add Reference 'System.Net'
3. Create an instance of SmtpClient Class .

I tried to call 'SendMailAsync' method but was missing.

I also browse 'System.Net.Mail.SmtpClient'  in 'Assembly Browser' but 'SendMailAsync' was not defined here. 

Screencast regarding same is  : http://screencast.com/t/7CJUM5eHS2uc

Environment Info : 

=== Xamarin Studio ===

Version 4.2.5 (build 0)
Installation UUID: 1151d3d9-29c1-4339-b53c-a54856b47901
Runtime:
	Mono 3.4.0 ((no/51469e6)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 304000202

=== Xamarin.Android ===

Version: 4.12.3 (Enterprise Edition)
Android SDK: /Users/shruti/Desktop/android-sdk-macosx
	Supported Android versions:
		2.1   (API level 7)
		2.2   (API level 8)
		2.3   (API level 10)
		3.1   (API level 12)
		3.2   (API level 13)
		4.0   (API level 14)
		4.0.3 (API level 15)
		4.1   (API level 16)
		4.2   (API level 17)
		4.3   (API level 18)
		4.4   (API level 19)
Java SDK: /usr
java version "1.7.0_55"
Java(TM) SE Runtime Environment (build 1.7.0_55-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.55-b03, mixed mode)

=== Apple Developer Tools ===

Xcode 5.1 (5084)
Build 5B130a

=== Xamarin.Mac ===

Xamarin.Mac: Not Installed

=== Xamarin.iOS ===

Version: 7.2.0.2 (Enterprise Edition)
Hash: 58c3efa
Branch: 
Build date: 2014-10-03 18:02:26-0400

=== Build Information ===

Release ID: 402050000
Git revision: 95ac543f224a70960a9ab71e24ce341eb87de06f
Build date: 2014-05-02 13:05:15-04
Xamarin addins: b81285ac0156281956135adb96685f98922893a1

=== Operating System ===

Mac OS X 10.9.2
Darwin Shrutis-Mac-mini.local 13.1.0 Darwin Kernel Version 13.1.0
    Thu Jan 16 19:40:37 PST 2014
    root:xnu-2422.90.20~2/RELEASE_X86_64 x86_64
Comment 2 Jonathan Pryor 2014-05-19 16:27:15 UTC
Mail.SendMailAsync() was added in .NET 4.5, and Mono has not yet implemented it:

https://github.com/mono/mono/blob/13a26cd0/mcs/class/System/System.Net.Mail/SmtpClient.cs

Note that there is no SendMailAsync() method.
Comment 3 Marek Safar 2014-05-23 15:43:15 UTC
Implemented in master