nant / nant

NAnt is a free .NET build tool. In theory it is kind of like make without make's wrinkles.
nant.sourceforge.net
GNU General Public License v2.0
260 stars 124 forks source link

Updated MailTask to use System.Net.Mail #10

Closed rmboggs closed 12 years ago

rmboggs commented 12 years ago

I revamped the MailTask to use the System.Net.Mail classes instead of System.Web.Mail. This opened up additional features that seem to be beneficial for NAnt, such as enabling ssl connections, specifying the port number, provide username/password info, etc. I was able to test these changes by sending emails through the gmail smtp server (my account).

Also, I did my best in trying to keep backward compatibility. One of the changes beween the two sets of mail classes is that the indicator specifying the message format (plain text/html). The old class used an enum while the new class uses a simple boolean indicator. In order to remove the System.Web dependency, I went ahead and created a simple enum within the MailTask class so the format attribute would still work (although, I marked it as obsolete).

Please take a good look at these updates and let me know if any additional changes are needed. This is quite a change so the more eyes, the better.

rmboggs commented 12 years ago

Just made the suggested changes.

rmboggs commented 12 years ago

Ah, got it. I like plainAddress. Will push this update shortly.

rmboggs commented 12 years ago

Should be good to go now. :)