Re: System.Web.Mail.Smtp namespace

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



I got it working but am using MS Exchange / Outlook for mail not
Domino/Notes


....

Dim Message As System.Web.Mail.MailMessage = New
System.Web.Mail.MailMessage
Message.To = txtTo.Text
Message.From = txtFrom.Text
Message.Subject = txtSubject.Text
Message.Body = txtBody.Text

Try

SmtpMail.SmtpServer = txtServer.Text ' Works whether
this is set or not (?)

SmtpMail.Send(Message)

Catch ex As Exception

MessageBox.Show(ex.Message)

End Try


NOTES:

Send(), and
SmtpServer

are both Shared members of the SmtpMail class, there is no need to
instantiate myMailServer to use them

As mentioned above, it appears that SmtpServer does not NEED to be set
(at least on WinXP, or Win 2000 Server systems). It works fine for me
wether or not I set it.

.