Hey There,
I am having trouble wrapping my head arround sending emails in asp .net (
VB).
I have updated my web.config with smtp settings, however when I do a page load event to create a new mailmessage class i get an error that MailMessage()is not defined.
Below is my web.config except and my page load event.
Thanks for your help on this, and I really hope someone can help.
-Rick
~~~Page Load~~~
Partial Class _500
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim msg As New MailMessage()
End Sub
End Class
~~~Web Config ~~~
<system.net>
<mailSettings>
<smtp deliveryMethod="Network">
<network
defaultCredentials="false"
host="my.mail.server.com"
port="25"
userName="XXXX"
password="XXXX" />
</smtp>
</mailSettings>
</system.net>
(I replace the host / username / password with valid details.)