Hey everyone,
I am trying to send an email and I never receive it, but I do get a message when I debug that:
"Property access must assign to the property or use its value."
Here is my VB code:
Imports System.Web.Mail
'Send email confirming purchase
Dim notification As New Net.Mail.MailMessage()
Dim mSmtpClient As New Net.Mail.SmtpClient()
notification.From = New Net.Mail.MailAddress("itintern@edc.org")
notification.To.Add(New Net.Mail.MailAddress(txtEmail.Text))
notification.Subject = "Purchasing order " & lblOrderNumber.Text
notification.Body = "Purchasing order " & lblOrderNumber.Text & " is being processed and is in the approval process now. You will receive an email notifying you if your purchase was approved or was not approved shortly."
mSmtpClient.Send(notification)
and here is my code in my Web.config file:
<system.net>
<mailSettings>
<smtp from="itintern@edc.org">
<!-- This is simply for testing purposes - Sam's personal account -->
<network host="server" userName="username" password="secret" port="25" defaultCredentials="true" />
</smtp>
</mailSettings>
</system.net>